From 90ee21e0c1b2179b53d1dbadd6232bf22a3eea5a Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 27 Sep 2022 11:36:23 +0700 Subject: Update purchase_order.py and sale_order.py --- indoteknik_custom/models/sale_order.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indoteknik_custom/models/sale_order.py') diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 1fb88495..73047171 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -39,6 +39,8 @@ class SaleOrder(models.Model): raise UserError("Status harus draft atau sent") approval1 = approval2 = 0 for line in order.order_line: + if line.product_id.id == 232383: + raise UserError(_('Tidak bisa Confirm menggunakan Produk Sementara')) if not line.product_id or line.product_id.type == 'service': continue if (line.item_percent_margin <= 15) and ( -- cgit v1.2.3