summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/sale_order.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 6f901809..08349bd3 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -46,6 +46,13 @@ class SaleOrder(models.Model):
# self.approval_status = False
# return super(SaleOrder, self).action_cancel()
+ def action_confirm(self):
+ for line in self.order_line:
+ if line.product_id.id == 232383:
+ raise UserError(_('Tidak bisa Confirm menggunakan Produk Sementara'))
+ res = super(SaleOrder, self).action_confirm()
+ return res
+
def compute_total_margin(self):
for order in self:
total_margin = total_percent_margin = 0