summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-10-16 14:05:28 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-10-16 14:05:28 +0700
commit39b3e85ebcef9a02b3d6cb881d071c37ef45ac4f (patch)
tree52e35e230f8e79918c8e899be47c1560772f0868
parentcee154a43c181b4ba1feda600028dffe198fb48b (diff)
add field pareto_status
-rwxr-xr-xindoteknik_custom/models/sale_order.py7
-rwxr-xr-xindoteknik_custom/views/sale_order.xml3
2 files changed, 10 insertions, 0 deletions
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 @@
<field name="margin_after_delivery_purchase"/>
<field name="percent_margin_after_delivery_purchase"/>
<field name="total_weight"/>
+ <field name="pareto_status"/>
</field>
<field name="analytic_account_id" position="after">
<field name="customer_type" required="1"/>
@@ -244,6 +245,7 @@
<field name="client_order_ref"/>
<field name="payment_type" optional="hide"/>
<field name="payment_status" optional="hide"/>
+ <field name="pareto_status" optional="hide"/>
</field>
</field>
</record>
@@ -262,6 +264,7 @@
<field name="date_driver_arrival"/>
<field name="payment_type" optional="hide"/>
<field name="payment_status" optional="hide"/>
+ <field name="pareto_status" optional="hide"/>
</field>
</field>
</record>