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
- Buchhaltung
- Lager
- PoS
- Projekte
- MRP
Diese Frage wurde gekennzeichnet
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.
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren