diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-01-14 02:39:57 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-01-14 02:39:57 +0000 |
| commit | 0e91195c3776ca6f9e9cdbdbd14803a7725b5700 (patch) | |
| tree | f6950d20e8a9d65fcfcc45fb1bd5e6dbdac0c621 /indoteknik_custom/models/account_move.py | |
| parent | 6dda865a1b3262ce78ed2db024fd03efb091d6a6 (diff) | |
| parent | fe9c85d0bc084e7787f348756c00864b5e239971 (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.py | 5 |
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: |
