diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-03 13:42:51 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-03 13:42:51 +0700 |
| commit | 566a20db595a2b0a1959a12d289361b16e1ef172 (patch) | |
| tree | 1cc955d3392241639a025b5860be246650f201c5 /indoteknik_custom/models/account_bank_statement.py | |
| parent | 3a8d2713d749ce40d3755d4e0b22898ace4b0d6d (diff) | |
add approval in editing reconcile & journal entries
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..495367e8 --- /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='Edit', default=False) + + def is_edited(self): + if not self.env.user.is_admin_reconcile: + raise UserError('Yang berhak hanya Mba Tania') + + self.is_edit = True + + def not_edited(self): + if not self.env.user.is_admin_reconcile: + raise UserError('Yang berhak hanya Mba Tania') + + self.is_edit = False
\ No newline at end of file |
