Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
2395 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Autore Risposta migliore

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

Avatar
Abbandona
Autore

Thanks a lot you're a life savior !

Risposta migliore

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
Abbandona

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>

Post correlati Risposte Visualizzazioni Attività
2
dic 24
21459
0
set 24
1170
0
feb 24
1625
0
feb 24
1210
1
gen 24
4250