summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-09-25 16:44:28 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-09-25 16:44:28 +0700
commitbd8a83a76cea6ef2466c250226f7c95c38b3024c (patch)
tree5540a0d4cadc3d58ed039fbf9cf1d74f66eeadf9
parentf504c45874db3e7a52e33a63911527931896fc07 (diff)
Enable edit purchase order line on unlocked purchase order
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml19
1 files changed, 16 insertions, 3 deletions
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index ac423bc5..e7a72cd3 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -57,8 +57,8 @@
<attribute name="options">{'no_create': True}</attribute>
</field>
<field name="product_qty" position="before">
- <field name="qty_available_store"/>
- <field name="suggest"/>
+ <field name="qty_available_store" readonly="1" />
+ <field name="suggest" readonly="1" />
</field>
<field name="price_unit" position="after">
<field name="price_vendor" attrs="{'readonly': 1}" optional="hide"/>
@@ -76,11 +76,23 @@
<field name="fiscal_position_id" position="after">
<field name="note_description"/>
<field name="total_so_percent_margin"/>
-
</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>
+ </xpath>
+
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='taxes_id']" position="attributes">
+ <attribute name="attrs">{'readonly': []}</attribute>
+ </xpath>
+
+ <xpath expr="//form/sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_qty']" position="attributes">
+ <attribute name="attrs">{'readonly': [], 'required': True}</attribute>
+ </xpath>
</field>
</record>
</data>
+
<data>
<record id="rfq_order_tree_view_inherit" model="ir.ui.view">
<field name="name">Purchase</field>
@@ -93,6 +105,7 @@
</field>
</record>
</data>
+
<data>
<record id="purchase_order_tree_view_inherit" model="ir.ui.view">
<field name="name">Purchase</field>