In Sales Order, when we add a product on order lines, how to lock description field? so only users on group can manage to edit that field.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účetnictví
- Sklad
- PoS
- Project
- MRP
This question has been flagged
Hi,
Just you need to inherit of order line view and need to mention group_id and then you can make the field read-only/editable.
<record model = "ir.ui.view" id = "view_product_form">
<field name = "name"> sale.order.line </field>
<field name="model">sale.order.line</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
<field name = "groups_id" eval = "[(6, 0, [ref ('module_name.group_id')])]" />
<field name = "arch" type = "xml">
<xpath expr = "// field [@ name = 'name']" position = "attributes">
<attribute name = "readonly"> 1 </attribute>
</xpath>
</field>
</record>
Regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Přihlásit seRelated Posts | Odpovědi | Zobrazení | Aktivita | |
---|---|---|---|---|
|
4
kvě 16
|
7744 | ||
|
1
srp 20
|
3222 | ||
|
1
čvn 23
|
1988 | ||
|
2
dub 16
|
5146 | ||
|
0
úno 16
|
5104 |