summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-01-06 15:24:55 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-01-06 15:24:55 +0700
commit5230d59fcd311ff5d3fa53c3907e971e97d4fb44 (patch)
treeb479055ed0dfd4fa9edc137bbe078d28ec4ed4a0
parentc168c71d419b303c6b2dded7e7ac0d3a3b8aa074 (diff)
<Miqdad> fix discount total not showing in amount discount
-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 f2a6c3e..92d31a2 100644
--- a/fixco_custom/models/purchase_order.py
+++ b/fixco_custom/models/purchase_order.py
@@ -428,7 +428,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')