Odoo Help

1

Hide existing field

By
Ajeng Shilvie
on 12/16/14, 1:32 AM 925 views

i want to hide route_id in sales.order line both in table and form view  how can i make it??

3

Disable group="Enable Route on Sales Order Line" for your user.

Go to Settings--> Groups --> search for "Enable Route on Sales Order Line"--> then remove the users selected in the list.

(OR)

        <record id="view_order_form_inherit" model="ir.ui.view">
            <field name="name">sale.order.form.sale.stock.inherit</field>
            <field name="model">sale.order</field>
            <field name="inherit_id" ref="sale_stock.view_order_form_inherit"/>
            <field name="arch" type="xml">
                <data>
                   <xpath expr="//field[@name='order_line']/form/group/group/field[@name='route_id']" position="attributes">
                       <attribute name="invisible">True</attribute>
                   </xpath>
                   <xpath expr="//field[@name='order_line']/tree/field[@name='route_id']" position="attributes">
                       <attribute name="invisible">True</attribute>
                   </xpath>
                </data>
           </field>
        </record>

0
Ajeng Shilvie
On 12/16/14, 2:04 AM

sorry i want to do it by code
 

why do you need to hide using Code? When we disable this group, the Odoo has already considered the possibility of hiding this field if the group is not enabled.

Atchuthan - Technical Consultant, Sodexis Inc
on 12/16/14, 2:25 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 12/16/14, 1:32 AM
Seen: 925 times
Last updated: 7/12/17, 3:06 PM