diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-11-25 02:42:37 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-11-25 02:42:37 +0000 |
| commit | 4dcd1e3e1a3e4dced5a2d0d89d2fd4ee3e1fe7d3 (patch) | |
| tree | 3e15c66065c81eead3fb40c9f87e3f2c269e20f2 /indoteknik_custom/models/account_move.py | |
| parent | 2aee5a44abbe36961dfe23cc3d656aa48e11e0f9 (diff) | |
| parent | 693e78afa8b9b4df99f417392b42bff12ea41f9e (diff) | |
Merged in production (pull request #132)
Production
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): |
