跳至内容
菜单
此问题已终结
2 回复
931 查看


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.

形象
丢弃
相关帖文 回复 查看 活动
0
7月 24
985
3
10月 19
3323
0
8月 25
3474
2
11月 23
2274
0
9月 22
2611