summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fixco_custom/models/purchase_order.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fixco_custom/models/purchase_order.py b/fixco_custom/models/purchase_order.py
index 2dbb3e9..b4adb7d 100644
--- a/fixco_custom/models/purchase_order.py
+++ b/fixco_custom/models/purchase_order.py
@@ -431,7 +431,9 @@ class PurchaseOrder(models.Model):
super(PurchaseOrder, self)._amount_all()
for order in self:
+ total_discount = order._get_line_discount_total + order.discount_total
amount_total = order.amount_untaxed + order.amount_tax + order.biaya_lain_lain - order.discount_total
+ order.amount_discount = total_discount
order.amount_total = order.currency_id.round(amount_total)
@api.depends('order_line.discount_amount')