diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-13 15:34:13 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-13 15:34:13 +0700 |
| commit | 41da8b32edee0dc394bb69ac179833388e977053 (patch) | |
| tree | 6693223ca8a2ae23a4b492ef05256e9e2d10a21a /indoteknik_custom/models/account_move.py | |
| parent | 88a54aebe579809dcaf8d8fd9640d5c4db83f2d6 (diff) | |
<iman> if unlock PO harus approv finance & if not FAT cannot edit jurnal entris
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 725b3c2d..022a7f5f 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 IT FAT 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: |
