i want to hide route_id in sales.order line both in table and form view how can i make it??
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Apskaita
- Atsarga
- PoS
- Projektas
- MRP
This question has been flagged
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>
<xpath expr="//field[@name='route_id']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registracija