Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
2391 มุมมอง

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
ผู้เขียน

Thanks a lot you're a life savior !

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง

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>

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to add a sequence a field? แก้ไขแล้ว
2
ธ.ค. 24
21457
0
ก.ย. 24
1168
0
ก.พ. 24
1622
0
ก.พ. 24
1206
1
ม.ค. 24
4246