diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-16 09:49:03 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-11-16 09:49:03 +0700 |
| commit | cb2d8e24bf7d45cf07e7c55e5476c5fd08df3a9f (patch) | |
| tree | 2a60a91afd5dda56310bf5ddd81b8dc4b4c6332a /indoteknik_custom/models/account_move.py | |
| parent | 25722cc3ab5ac5afef4d77947f8e2f27355e6837 (diff) | |
| parent | 4730df5bf97724cd906c8118178407bfbf206bca (diff) | |
Merge branch 'production' into cr/auth
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): |
