summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-09-27 11:36:23 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-09-27 11:36:23 +0700
commit90ee21e0c1b2179b53d1dbadd6232bf22a3eea5a (patch)
treea80f2ebcdc1aa07e51f94b7be821be3a5be2e789
parent59354f566bc4d735f5a4a7bd96d663247d1990e2 (diff)
Update purchase_order.py and sale_order.py
-rwxr-xr-xindoteknik_custom/models/purchase_order.py2
-rwxr-xr-xindoteknik_custom/models/sale_order.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index a9d9cc6b..406b17fc 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -9,7 +9,7 @@ class PurchaseOrder(models.Model):
procurement_status = fields.Char(string='Procurement Status', compute='get_procurement_status', readonly=True)
approval_status = fields.Selection([
('pengajuan1', 'Approval Manager'), #siapa? darren - 11
- ('pengajuan2', 'Approval Pimpinan'), #akbar - 7
+ ('pengajuan2', 'Approval Pimpinan'), #akbar - 7 temporary not used
('approved', 'Approved'),
], string='Approval Status', readonly=True, copy=False, index=True, tracking=3)
count_line_product = fields.Float('Count Line Product', compute='compute_count_line_product')
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 (