Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
2283 Weergaven

On the sale order line view table, there is column product_uom and I can't figure out how to remove it. I created a custom addon to customize my view, everything works fine except this field which sticks to my view. here is my code :


    sale.order.form.inherit.napsis.sale
    sale.order
    
    
        
            
            
        
    


The column_invisible attribute doesn't apply here...

What's wrong ?

Thanks a lot

Avatar
Annuleer
Beste antwoord

Hi,

 Inherit sale order form view and add the below code for adding column invisible property..

 <xpath expr="//field[@name='order_line']//tree//field[@name='product_uom_qty']" position="attributes">
<attribute name="column_invisible">1</attribute>
 </xpath>


Hope it helps

Avatar
Annuleer
Auteur Beste antwoord

Thanks votre your answer but it is product_uom that I want to remove (the unit) and not product_uom_qty...

Avatar
Annuleer
Auteur

Thanks a lot you're a life savior !

Beste antwoord

Hello Arthur LEHAVRE,


To remove product_uom_qty from the sale.order.line


//Code in Comment//


Hope this Helps,

If you need any help in customization feel free to contact us.


Thanks & Regards,

Email:  odoo@aktivsoftware.com           

Skype: kalpeshmaheshwari

Avatar
Annuleer

Code:

<record id="sale__order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.inherit.form</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'][2]" position="attributes">
<attribute name="column_invisible">1</attribute>
# <attribute name="optional">hide</attribute>
</xpath>
</field>
</record>

Gerelateerde posts Antwoorden Weergaven Activiteit
2
dec. 24
21350
0
sep. 24
1114
0
feb. 24
1543
0
feb. 24
1133
1
jan. 24
3970