diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-16 13:37:24 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-08-16 13:37:24 +0700 |
| commit | 10db08f6db326d236efc8a4e3d9d91fbff931ed8 (patch) | |
| tree | 9ca4088d0c70617665d2cc89d4a6f9970271ca33 | |
| parent | de5734f8041c5c7590f254ccc615fc650a6e2fbf (diff) | |
Fix default total_percent_margin on sale order
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 036fba1b..ca98cde4 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -360,6 +360,7 @@ class SaleOrder(models.Model): def _compute_total_percent_margin(self): for order in self: if order.amount_untaxed == 0: + order.total_percent_margin = 0 continue order.total_percent_margin = round((order.total_margin / order.amount_untaxed) * 100, 2) |
