Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
4022 Tampilan
<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
Avatar
Buang
Jawaban Terbai

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


Avatar
Buang
Penulis Jawaban Terbai
Bouabaker Abdallah 

I tried a lot of cases and including your case, it doesn't work
Avatar
Buang
Jawaban Terbai
try this 
    <field name="product_uom" attrs="{'invisible': [('parent.state', '!=', ['draft', 'sent'])]}"/>
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Agu 25
52
0
Feb 25
765
2
Okt 24
3650
1
Agu 24
1175
2
Jun 24
2227