<xpath expr="//sheet/notebook/page/field[@name='order_line']/tree/field[@name='product_uom_qty']" position="after">
<field name="product_uom" attrs="{'column_invisible': [('parent.state', 'not in', ['draft', 'sent'])]}"/>
</xpath>
other schools operate and this school is not, who can tell me why
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
Hello,
First, make sure you have enabled Units of Measure from Sales > Configuration.
and put the following code,
<record id="view_sale_order_form_inherit_" model="ir.ui.view">
<field name="name">sale.order.form.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[@name='product_uom']" position="attributes">
<attribute name="attrs">{'readonly': [('state', 'in', ('sale','done', 'cancel'))], 'column_invisible': [('parent.state', 'not in', ['draft', 'sent'])]}</attribute>
</xpath>
</field>
</record>
Thanks
try this<field name="product_uom" attrs="{'invisible
': [('parent.state', '!=',
['draft', 'sent'])]}"/>
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
0
أغسطس 25
|
52 | ||
|
0
فبراير 25
|
765 | ||
|
2
أكتوبر 24
|
3649 | ||
|
1
أغسطس 24
|
1175 | ||
Removeing attrs in 17.0
تم الحل
|
|
2
يونيو 24
|
2225 |
Look into Odoo Customization: https://plus.google.com/collection/QbIDWE