Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
1073 มุมมอง


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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

  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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ค. 24
1052
3
ต.ค. 19
3442
0
ส.ค. 25
3474
V16 export user access rights แก้ไขแล้ว
2
พ.ย. 23
2374
0
ก.ย. 22
2858