summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fixco_custom/models/account_move.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/fixco_custom/models/account_move.py b/fixco_custom/models/account_move.py
index 3ec7e5e..028e2cb 100644
--- a/fixco_custom/models/account_move.py
+++ b/fixco_custom/models/account_move.py
@@ -395,10 +395,7 @@ class PurchaseOrderLineWizard(models.TransientModel):
def action_add_lines(self):
for item in self.line_ids:
- if item.qty_received <= 0:
- raise UserError(f"Line {item.name} has no received quantity.")
-
- if item.qty_invoiced >= item.qty_received:
+ if item.bill_remain <= 0:
raise UserError(f"Item: {item.name} from PO: {item.order_id.name} has already been fully invoiced.")
self.ensure_one()
@@ -424,7 +421,6 @@ class PurchaseOrderLineWizard(models.TransientModel):
line = new_lines.new(vals)
- # WAJIB supaya account kecompute benar
line.account_id = line._get_computed_account()
line._onchange_price_subtotal()