From f53312f3f2c78d50d838c249a8d0eb1ed1e5b7f2 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 5 Mar 2024 16:05:41 +0700 Subject: Add web sale approval feature --- indoteknik_custom/models/res_partner.py | 6 ++++++ indoteknik_custom/models/sale_order.py | 5 +++++ indoteknik_custom/views/res_partner.xml | 4 ++++ indoteknik_custom/views/sale_order.xml | 1 + 4 files changed, 16 insertions(+) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py index a7302245..c7b8865f 100644 --- a/indoteknik_custom/models/res_partner.py +++ b/indoteknik_custom/models/res_partner.py @@ -23,6 +23,12 @@ class ResPartner(models.Model): digital_invoice_tax = fields.Boolean(string="Digital Invoice & Faktur Pajak") is_potential = fields.Boolean(string='Potential') pakta_integritas = fields.Boolean(string='Pakta Integritas') + + use_so_approval = fields.Boolean(string='Use SO Approval') + web_role = fields.Selection([ + ('manager', 'Manager'), + ('director', 'Director') + ], string='Web Role') def get_child_ids(self): partner = self.env['res.partner'].search([('id', '=', self.id)], limit=1) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index f44f624e..988f13c8 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -88,6 +88,11 @@ class SaleOrder(models.Model): picking_iu_id = fields.Many2one('stock.picking', 'Picking IU') helper_by_id = fields.Many2one('res.users', 'Helper By') eta_date = fields.Datetime(string='ETA Date', copy=False, compute='_compute_eta_date') + web_approval = fields.Selection([ + ('company', 'Company'), + ('cust_manager', 'Customer Manager'), + ('cust_director', 'Customer Director') + ], string='Web Approval', copy=False) def _compute_eta_date(self): max_leadtime = 0 diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml index da2dec99..c050ec62 100644 --- a/indoteknik_custom/views/res_partner.xml +++ b/indoteknik_custom/views/res_partner.xml @@ -26,6 +26,10 @@ + + + + diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 64e6ad7b..8e05c2e7 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -142,6 +142,7 @@ +