diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-15 10:32:25 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-11-15 10:32:25 +0700 |
| commit | 132d4b80f3d5dad792468bd14961f6a9540122e2 (patch) | |
| tree | 3fad75ed79dac19785a9a642fb5dae7b255defdf /indoteknik_custom/models/account_move.py | |
| parent | a1d0f8c14308655b5c1f532927e093569c654216 (diff) | |
add new role for wms and fix bug delete reconcile
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index fe9db583..d55cca38 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -48,8 +48,9 @@ class AccountMove(models.Model): def unlink(self): res = super(AccountMove, self).unlink() - if self.state == 'posted': - raise UserError('Data Hanya Bisa Di Cancel') + for rec in self: + if rec.state == 'posted': + raise UserError('Data Hanya Bisa Di Cancel') return res def button_cancel(self): |
