summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-01-14 02:39:57 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-01-14 02:39:57 +0000
commit0e91195c3776ca6f9e9cdbdbd14803a7725b5700 (patch)
treef6950d20e8a9d65fcfcc45fb1bd5e6dbdac0c621 /indoteknik_custom/models/account_move.py
parent6dda865a1b3262ce78ed2db024fd03efb091d6a6 (diff)
parentfe9c85d0bc084e7787f348756c00864b5e239971 (diff)
Merged in CR-mbaZila (pull request #266)
CR mbaZila
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 42678847..e681d96e 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -318,6 +318,11 @@ class AccountMove(models.Model):
if rec.statement_line_id and not rec.statement_line_id.statement_id.is_edit and rec.statement_line_id.statement_id.state == 'confirm':
raise UserError('Bank Statement di Lock, Minta admin reconcile untuk unlock')
+ def write(self, vals):
+ if not self.env.user.is_accounting:
+ raise UserError("Hanya Finence yang bisa ubah data")
+ return super(AccountMove, self).write(vals)
+
# def write(self, vals):
# res = super(AccountMove, self).write(vals)
# for rec in self.line_ids: