summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_bank_statement.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-11-06 08:50:31 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-11-06 08:50:31 +0700
commitb3e90d317b993b23c549fc985231a59df9f8c352 (patch)
tree4d272d80e930a735248a35a63594d88092c47952 /indoteknik_custom/models/account_bank_statement.py
parentefa51f6b1c5254996db90a90468241da303a7e21 (diff)
parentf8fcf079afbe107ed8bda3e6e832b58786d2a42a (diff)
Merge branch 'production' into commision-window
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