콘텐츠로 건너뛰기
메뉴
신고된 질문입니다
1 회신
1794 화면

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

아바타
취소
관련 게시물 답글 화면 활동
4
5월 16
7908
1
8월 20
3420
1
6월 23
2177
2
4월 16
5352
0
2월 16
5290