summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
diff options
context:
space:
mode:
authorHafidBuroiroh <hafidburoiroh09@gmail.com>2025-09-23 11:31:14 +0700
committerHafidBuroiroh <hafidburoiroh09@gmail.com>2025-09-23 11:31:14 +0700
commite1678372f8af653d30d49f38abe8ca3129e29a03 (patch)
tree2375aac399c56d917d0ed6d419b182fdaa50897e /indoteknik_custom/views/purchase_order.xml
parent6d50b35724592c4f8c302204adcfbc0f5db3727f (diff)
parentf58e6e2fa013789bfa8ac8456cd29735a83a56d0 (diff)
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into refund_system
Diffstat (limited to 'indoteknik_custom/views/purchase_order.xml')
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml11
1 files changed, 7 insertions, 4 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 821f3295..7feec934 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -99,6 +99,7 @@
<field name="total_delivery_amt" attrs="{'required': [('partner_id', 'in', [9688, 29712])]}"/>
<field name="product_bom_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
<field name="manufacturing_id" attrs="{'invisible': [('product_bom_id', '=', None)]}"/>
+ <field name="show_description" attrs="{'invisible': [('partner_id', 'not in', [5571, 35475, 38198, 88261,37905, 9688, 20625, 1371, 37902, 12119])]}" widget="boolean_toggle"/>
<!-- <field name="move_id" domain="[('move_type','=','entry')]" context="{'form_view_ref': 'account.view_move_form'}" options="{'no_create': True}"/> -->
</field>
<field name="amount_total" position="after">
@@ -112,6 +113,7 @@
</field>
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
+ <field name="show_description" optional="hide" widget="boolean_toggle"/>
</field>
<field name="product_id" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
@@ -181,19 +183,20 @@
</field>
<field name="order_line" position="attributes">
- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute>
+ <!-- <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['purchase', 'done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute> -->
+ <attribute name="attrs">{'readonly': [('has_active_invoice', '=', True)]}</attribute>
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">
- <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes">
- <attribute name="attrs">{'readonly': []}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])]}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes">
- <attribute name="attrs">{'required': True}</attribute>
+ <attribute name="attrs">{'readonly': [('state', 'in', ['purchase', 'done', 'cancel'])], 'required': True}</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page[@name='purchase_delivery_invoice']" position="before">