Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
1013 Lượt xem


How can I make it so that a specific user can create quotes but not confirm them?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

  1. Create a new security group to control access to the "Confirm" button.

   2. Assign this security group to the users who should have permission to access the button.

   3. Customize the Quotation/Sales Order form view using inheritance and add the groups attribute to the        "Confirm" button, restricting its access to the newly created security group.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Please refer to the code below:


<record id="view_order_form" model="ir.ui.view">

    <field name="name">sale.order.view.form.inherit</field>

    <field name="inherit_id" ref="sale.view_order_form"/>

    <field name="model">sale.order</field>

    <field name="arch" type="xml">

         <xpath expr="//button[@name='action_confirm']" position="attributes">

            <attribute name="groups">custom_module.custom_group</attribute>

        </xpath>

    </field>

</record>


Only members of the group can confirm the sales order.


Hope it helps.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 24
1019
3
thg 10 19
3372
0
thg 8 25
3474
2
thg 11 23
2319
0
thg 9 22
2732