1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?xml version="1.0"?>
<odoo>
<data>
<record id="view_order_form_inherit_sale_stock" model="ir.ui.view">
<field name="name">sale.order.form.sale.dropshipping</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="groups_id" eval="[(4, ref('purchase.group_purchase_user'))]"/>
<field name="arch" type="xml">
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_updatable']" position="after">
<field name="purchase_line_count" invisible="1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/form//field[@name='product_id']" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_count', '>', 0)], 'required': [('display_type', '=', False)],}</attribute>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_updatable']" position="after">
<field name="purchase_line_count" invisible="1"/>
</xpath>
<xpath expr="//page/field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('product_updatable', '=', False), ('purchase_line_count', '>', 0)], 'required': [('display_type', '=', False)],}</attribute>
</xpath>
</field>
</record>
</data>
</odoo>
|