summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-09-16 09:27:32 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-09-16 09:27:32 +0700
commit7fe2c169a448df17c9395dfae20c524e94aa8bfc (patch)
tree0057b6a31222fc0468b7f8116ce066f699eba937 /indoteknik_custom/views/purchase_order.xml
parent78a4f924fa9ba38c58954b5840632806b04fff19 (diff)
push
Diffstat (limited to 'indoteknik_custom/views/purchase_order.xml')
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml10
1 files changed, 6 insertions, 4 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index 821f3295..a3a5e05c 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -112,6 +112,7 @@
</field>
<field name="product_id" position="before">
<field name="line_no" attrs="{'readonly': 1}" optional="hide"/>
+ <field name="show_description" optional="hide"/>
</field>
<field name="product_id" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
@@ -181,19 +182,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">