Skip to Content
Menu
This question has been flagged

Hello, mates!

In view "purchase.purchase_order_form" we have header with buttons. I want to add confirmation pop-up for "button_confirm" button.

I saw a lot of videos and post on this forum about this problem. The easiest way to solve this to add "confirm" attribute. More harder way is write a wizard.

Okay, I tried to add "confirm" attribute to button and it doesn't work on my system, but everybody on forum says it is helpful for them.


There is my code, looks good:


Are you sure you want to confirm the purchase?


Please, help with this annoying problem, which seams easy but can't fix for a long time...

Thanks!

Avatar
Discard
Best Answer

Hi,

In the “purchase.purchase_order_form” view, there are two buttons named "button_confirm."  You have to give the confirm attribute to both buttons to achieve your requirement; see below.

<button name="button_confirm" type="object" invisible="state != 'sent'" string="Confirm Order" confirm="Are you sure you want to confirm the purchase?" context="{'validate_analytic': True}" class="oe_highlight" id="bid_confirm" data-hotkey="q"/>

<button name="button_confirm" type="object" invisible="state != 'draft'" confirm="Are you sure you want to confirm the purchase?" context="{'validate_analytic': True}" string="Confirm Order" id="draft_confirm" data-hotkey="q"/>


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
0
Jan 24
974
4
Dec 21
6767
1
Sep 21
6515
2
Mar 15
9602
1
Oct 24
1006