summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-01-15 13:37:10 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-01-15 13:37:10 +0700
commit1780b3327ae4d1227cc0a8238be66f5e64ffcbc1 (patch)
tree8fca9aad77152342e644efeea85ab91190394a80
parent281712797fccafcc2fc0f89b152c636c02ac2c46 (diff)
delivery amt po
-rwxr-xr-xindoteknik_custom/models/purchase_order.py1
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml10
2 files changed, 9 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 57e848bc..a69bfc15 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -85,6 +85,7 @@ class PurchaseOrder(models.Model):
# total_delivery_amt = fields.Float(string='Total Delivery Amt')
total_cost_service = fields.Float(string='Total Cost Service')
total_delivery_amt = fields.Float(string='Total Delivery Amt')
+ store_name = fields.Char(string='Nama Toko')
@api.onchange('total_cost_service')
def _onchange_total_cost_service(self):
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 46efd1f1..a70b2058 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -60,8 +60,8 @@
<field name="summary_qty_po"/>
<field name="count_line_product"/>
<field name="payment_term_id"/>
- <field name="total_cost_service"/>
- <field name="total_delivery_amt"/>
+ <field name="total_cost_service" attrs="{'required': [('partner_id', 'in', [9688, 29712])]}"/>
+ <field name="total_delivery_amt" attrs="{'required': [('partner_id', 'in', [9688, 29712])]}"/>
</field>
<field name="amount_total" position="after">
<field name="total_margin"/>
@@ -69,6 +69,9 @@
<field name="total_percent_margin"/>
<field name="total_so_percent_margin"/>
</field>
+ <field name="partner_ref" position="before">
+ <field name="store_name" attrs="{'invisible': [('partner_id', 'not in', [9688, 29712])]}"/>
+ </field>
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
</field>
@@ -193,6 +196,9 @@
<field name="logbook_bill_id" optional="hide"/>
<field name="status_printed" optional="hide"/>
</field>
+ <field name="partner_id" position="after">
+ <field name="store_name"/>
+ </field>
</field>
</record>
</data>