Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2064 Vues

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.

Avatar
Ignorer
Meilleure réponse

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

Avatar
Ignorer
Publications associées Réponses Vues Activité
4
mai 16
8225
1
août 20
3666
1
juin 23
2530
2
avr. 16
5690
0
févr. 16
5598