summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-09-08 11:03:50 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-09-08 11:03:50 +0700
commitf1b119641b64b77427caa5199d9ce04e5c965c52 (patch)
tree1d2b862e2e8900144846dac48e46b5e9011b2e77
parent323da166ce71a8a14bedad816d3bbddb9a84139e (diff)
fix bug
-rw-r--r--fixco_custom/models/account_move_line.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fixco_custom/models/account_move_line.py b/fixco_custom/models/account_move_line.py
index 0db9c33..68df00b 100644
--- a/fixco_custom/models/account_move_line.py
+++ b/fixco_custom/models/account_move_line.py
@@ -15,5 +15,6 @@ class AccountMoveLine(models.Model):
@api.onchange('quantity')
def _onchange_quantity(self):
for line in self:
- if line and line.quantity > line.qty_outstanding:
- raise UserError(_("Quantity Tidak Boleh Melebihi Qty Outstanding"))
+ if line.move_id.move_type == 'in_invoice':
+ if line and line.quantity > line.qty_outstanding:
+ raise UserError(_("Quantity Tidak Boleh Melebihi Qty Outstanding"))