diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-06-05 09:43:28 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-06-05 09:43:28 +0700 |
| commit | 7ffcb706cfbacdc7abf11c239073acadaae469a7 (patch) | |
| tree | 03e2677690da0815536befacbbfb15682adfb8ba | |
| parent | ed2cd466938f7aee19688b6402edbb3643ee21e1 (diff) | |
fix compute grand total in sales order
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index d021934f..735a467c 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -425,7 +425,10 @@ class SaleOrder(models.Model): def _compute_grand_total(self): for order in self: - order.grand_total = order.delivery_amt + order.amount_total + if order.shipping_cost_covered == 'customer': + order.grand_total = order.delivery_amt + order.amount_total + else: + order.grand_total = order.amount_total class SaleOrderLine(models.Model): |
