summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_bank_statement.py
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-11-10 13:40:58 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-11-10 13:40:58 +0700
commit2aee5a44abbe36961dfe23cc3d656aa48e11e0f9 (patch)
tree8ec2b6552aaef4e14539aa52ed796552e24180d6 /indoteknik_custom/models/account_bank_statement.py
parent6a87e59e7220bdfa78e98b23003ccc4ef41bd0ce (diff)
parentb4e74170aeaf00937f78e5af9047218ddb17516c (diff)
Merge branch 'production' into change/feature/promotion-program
Diffstat (limited to 'indoteknik_custom/models/account_bank_statement.py')
-rw-r--r--indoteknik_custom/models/account_bank_statement.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_bank_statement.py b/indoteknik_custom/models/account_bank_statement.py
new file mode 100644
index 00000000..23008f13
--- /dev/null
+++ b/indoteknik_custom/models/account_bank_statement.py
@@ -0,0 +1,19 @@
+from odoo import fields, models, api, _
+from odoo.exceptions import AccessError, UserError, ValidationError
+
+class AccountBankStatement(models.Model):
+ _inherit = "account.bank.statement"
+
+ 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 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 dan Iqmal Saputra')
+
+ self.is_edit = False \ No newline at end of file