From 5dc329c18c278d8eaed23cfb0ea060ac7685cea2 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 23 Apr 2024 10:40:18 +0700 Subject: Add customer procurement on sale order approval --- indoteknik_custom/models/sale_order.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (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 f9f849ca..6f140072 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -95,6 +95,7 @@ class SaleOrder(models.Model): ('company', 'Company'), ('cust_manager', 'Customer Manager'), ('cust_director', 'Customer Director') + ('cust_procurement', 'Customer Procurement') ], string='Web Approval', copy=False) compute_fullfillment = fields.Boolean(string='Compute Fullfillment', compute="_compute_fullfillment") @@ -468,8 +469,8 @@ class SaleOrder(models.Model): SYSTEM_UID = 25 FROM_WEBSITE = order.create_uid.id == SYSTEM_UID - if FROM_WEBSITE and main_parent.use_so_approval and order.web_approval != 'cust_director': - raise UserError("This order not yet approved by customer director") + if FROM_WEBSITE and main_parent.use_so_approval and order.web_approval != 'cust_procurement': + raise UserError("This order not yet approved by customer procurement") if order.validate_partner_invoice_due(): return self._create_notification_action('Notification', 'Terdapat invoice yang telah melewati batas waktu, mohon perbarui pada dokumen Due Extension') -- cgit v1.2.3