summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views/purchase_order.xml
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-26 14:56:35 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-26 14:56:35 +0700
commitd324fdd8ea3b14c966510bde610a96c8f5c3e3c5 (patch)
tree92ef64b4a6614154dfbfccd175425977b8574c11 /indoteknik_custom/views/purchase_order.xml
parent25a3271bd14671d57da6b4349745e446e94ebfef (diff)
Update readonly condition order line on purchase order
Diffstat (limited to 'indoteknik_custom/views/purchase_order.xml')
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index e7a72cd3..0ad76ae5 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -76,6 +76,11 @@
<field name="fiscal_position_id" position="after">
<field name="note_description"/>
<field name="total_so_percent_margin"/>
+ <field name="has_active_invoice" invisible="1" />
+ </field>
+
+ <field name="order_line" position="attributes">
+ <attribute name="attrs">{'readonly': ['|', ('state', 'in', ['done', 'cancel']), ('has_active_invoice', '=', True)]}</attribute>
</field>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_unit']" position="attributes">