diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-10 13:40:58 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-10 13:40:58 +0700 |
| commit | 2aee5a44abbe36961dfe23cc3d656aa48e11e0f9 (patch) | |
| tree | 8ec2b6552aaef4e14539aa52ed796552e24180d6 /indoteknik_custom/models/account_bank_statement.py | |
| parent | 6a87e59e7220bdfa78e98b23003ccc4ef41bd0ce (diff) | |
| parent | b4e74170aeaf00937f78e5af9047218ddb17516c (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.py | 19 |
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 |
