This question has been flagged
1 Reply
3309 Views

Can anybody tell me how to restrict the user from confirming the purchase requisition? In my case when a user is creating a purchase requisition than the user after saving it is able to send it to the supplier rather I want the user to just generate the purchase requisition and let the manager do the remaining works like sending the purchase requisition to the supplier and than receiving the goods. Please help me out. Thanks in advance.

Avatar
Discard
Best Answer

Default Purchase Order Module purchase_view file form view header button the below code shows:

<button name="purchase_confirm" states="draft" string="Confirm Order"/>
 <button name="purchase_confirm" states="sent" string="Confirm Order" class="oe_highlight"/>

Based on your requirement the below code modify in custom module

<button name="purchase_confirm" states="draft" string="Confirm Order" groups="purchase.group_purchase_manager"/>
 <button name="purchase_confirm" states="sent" string="Confirm Order" class="oe_highlight" groups="purchase.group_purchase_manager"/>

The above code Confirm Order can view only Admin and Manger Group

Avatar
Discard
Author

I searched for Purchase Order XML file but there was no such file. Rather there are two other XML file which are purchase_demo and purchase_view file. Can you tell me where to make the following changes as said by you? Please help me out.

I updated the answer. You should always prefer to do your modifications in a custom module.

Author

Sir, I am thankful for your answer but after I tried out the code as said by you in Purchase_view file its still not working and I am facing the same problem. Can you tell me if I need to make any other changes?

After changing in the xml file update the purchase module in openerp and check the output.