summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2023-03-23 10:06:34 +0700
committerstephanchrst <stephanchrst@gmail.com>2023-03-23 10:06:34 +0700
commit38ab7753de04c6ae8e480cd243e831966dc03fb1 (patch)
tree725e35dbe402a48674cf0a92851ecef048fbd574
parent768825fb0c1f7d77da1d4689f21bc0473a5085c8 (diff)
readonly if approval status not empty in sales order
-rwxr-xr-xindoteknik_custom/views/sale_order.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml
index 3bdb705b..203b2d13 100755
--- a/indoteknik_custom/views/sale_order.xml
+++ b/indoteknik_custom/views/sale_order.xml
@@ -46,7 +46,7 @@
</attribute>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='price_total']" position="after">
- <field name="vendor_id" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}"/>
+ <field name="vendor_id" attrs="{'readonly': [('parent.approval_status', '=', 'approved')]}"/>
<field name="purchase_price" attrs="
{
'readonly': [
@@ -56,7 +56,7 @@
]
}
"/>
- <field name="purchase_tax_id" attrs="{'readonly': [('parent.state', 'not in', ['draft', 'sent', 'sale'])]}" domain="[('type_tax_use','=','purchase')]"/>
+ <field name="purchase_tax_id" attrs="{'readonly': [('parent.approval_status', '!=', False)]}" domain="[('type_tax_use','=','purchase')]"/>
<field name="item_percent_margin"/>
</xpath>
<xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_id']" position="before">