diff options
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index fa5f3b6a..5c9266a0 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -291,7 +291,7 @@ class SaleOrder(models.Model): raise UserError(_('Isi Vendor, Harga Beli, dan Tax sebelum Request Approval')) if order.total_percent_margin <= 15 and not self.env.user.is_leader: raise UserError("Harus diapprove oleh Pimpinan") - elif order.total_percent_margin <= 25 and not self.env.user.is_leader and not self.env.user.is_sales_manager: + elif order.total_percent_margin <= 22 and not self.env.user.is_leader and not self.env.user.is_sales_manager: raise UserError("Harus diapprove oleh Manager") else: order.approval_status = 'approved' @@ -301,7 +301,7 @@ class SaleOrder(models.Model): def compute_total_margin(self): for order in self: - total_margin = total_percent_margin = sum_sales_price = 0 + total_margin = total_percent_margin = 0 for line in order.order_line: if not line.product_id: order.total_margin = 0 |
