summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-10-16 14:56:39 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-10-16 14:56:39 +0700
commita1b2542ebc2d527d07edbcbaab467152a46f1d33 (patch)
tree3ec0b51722dad61e2bf83b0272ab84854b5f6c5d
parente60bfff5a9ec49545370b1804b33535b5f373b60 (diff)
parent39b3e85ebcef9a02b3d6cb881d071c37ef45ac4f (diff)
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
-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>