diff options
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 4d0d6ae5..6a847c1d 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -61,10 +61,14 @@ class AccountMove(models.Model): tb = Terbilang() for record in self: + if record.sale_id.delivery_amt <= 0: + continue + if record.sale_id.delivery_amt > 0: tb.parse(int(record.sale_id.delivery_amt)) record.delivery_amt_text = tb.getresult().title() + @api.constrains('bills_efaktur_document') def _constrains_efaktur_document(self): for move in self: |
