Odoo Help

Welcome!

This community 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.

1

Hide existing field

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

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

2

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3918
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 12/16/14, 1:55 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/16/14, 1:32 AM
Seen: 654 times
Last updated: 3/16/15, 8:10 AM