summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2023-11-04 09:19:07 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2023-11-04 09:19:07 +0700
commitd05d1f609441ff0ead57d447c0ece63a968410de (patch)
tree9d10ebc0c2a6df0c556da90300a02f4e0205c019
parente94cfd1fee485d0e84fb50a66a7584572452b5dc (diff)
invisible field edit on reconcile
-rw-r--r--indoteknik_custom/models/account_bank_statement.py6
-rw-r--r--indoteknik_custom/views/account_bank_statement.xml2
2 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/account_bank_statement.py b/indoteknik_custom/models/account_bank_statement.py
index 495367e8..23008f13 100644
--- a/indoteknik_custom/models/account_bank_statement.py
+++ b/indoteknik_custom/models/account_bank_statement.py
@@ -4,16 +4,16 @@ from odoo.exceptions import AccessError, UserError, ValidationError
class AccountBankStatement(models.Model):
_inherit = "account.bank.statement"
- is_edit = fields.Boolean(string='Edit', default=False)
+ is_edit = fields.Boolean(string='Unlock', default=False)
def is_edited(self):
if not self.env.user.is_admin_reconcile:
- raise UserError('Yang berhak hanya Mba Tania')
+ raise UserError('Yang berhak hanya Mba Tania dan Iqmal Saputra')
self.is_edit = True
def not_edited(self):
if not self.env.user.is_admin_reconcile:
- raise UserError('Yang berhak hanya Mba Tania')
+ raise UserError('Yang berhak hanya Mba Tania dan Iqmal Saputra')
self.is_edit = False \ No newline at end of file
diff --git a/indoteknik_custom/views/account_bank_statement.xml b/indoteknik_custom/views/account_bank_statement.xml
index a4e4f7e5..db380f37 100644
--- a/indoteknik_custom/views/account_bank_statement.xml
+++ b/indoteknik_custom/views/account_bank_statement.xml
@@ -23,7 +23,7 @@
<button string="Lock" class="oe_highlight" name="not_edited" type="object" attrs="{'invisible':['|', '|', ('is_edit', '=', False), ('line_ids','=',[]), ('state', '!=', 'confirm')]}"/>
</button>
<field name="date" position="after">
- <field name="is_edit"/>
+ <field name="is_edit" invisible="1"/>
</field>
</field>
</record>