From 39b3e85ebcef9a02b3d6cb881d071c37ef45ac4f Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Wed, 16 Oct 2024 14:05:28 +0700 Subject: add field pareto_status --- indoteknik_custom/models/sale_order.py | 7 +++++++ indoteknik_custom/views/sale_order.xml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index e6382cd9..22130ac3 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -136,6 +136,12 @@ class SaleOrder(models.Model): domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]", tracking=True) total_weight = fields.Float(string='Total Weight', compute='_compute_total_weight') + pareto_status = fields.Selection([ + ('PR', 'Pareto Repeating'), + ('PPR', 'Potensi Pareto Repeating'), + ('PNR', 'Pareto Non Repeating'), + ('NP', 'Non Pareto') + ]) def _compute_total_weight(self): total_weight = 0 @@ -642,6 +648,7 @@ class SaleOrder(models.Model): self.sppkp = parent_id.sppkp self.customer_type = parent_id.customer_type self.email = parent_id.email + self.pareto_status = parent_id.pareto_status @api.onchange('partner_id') def onchange_partner_id(self): diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 9a637441..98001589 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -73,6 +73,7 @@ + @@ -244,6 +245,7 @@ + @@ -262,6 +264,7 @@ + -- cgit v1.2.3