Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1676 Переглядів

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.

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
4
трав. 16
7770
1
серп. 20
3237
1
черв. 23
2014
2
квіт. 16
5167
0
лют. 16
5126