From 649a8f0d51b8fa7dc90dfbd0967e94dd586cd0aa Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 13 Sep 2024 16:21:50 +0700 Subject: bug fix sales order with amount equal zero --- indoteknik_custom/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9a6dbd9e..6348328e 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -131,7 +131,7 @@ class SaleOrder(models.Model): for order in self: order.margin_after_delivery_purchase = order.total_margin - order.purchase_delivery_amt if order.amount_untaxed == 0: - order.total_percent_margin = 0 + order.percent_margin_after_delivery_purchase = 0 continue if order.shipping_cost_covered == 'indoteknik': delivery_amt = order.delivery_amt -- cgit v1.2.3