コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2717 ビュー

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!

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
0
1月 24
1200
4
12月 21
7033
1
9月 21
6710
2
3月 15
9837
1
10月 24
1265