Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
949 Prikazi


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

Avatar
Opusti
Best Answer

  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.

Avatar
Opusti
Best Answer

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.

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jul. 24
991
3
okt. 19
3332
0
avg. 25
3474
2
nov. 23
2288
0
sep. 22
2692