Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2718 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 1 24
1200
4
thg 12 21
7033
1
thg 9 21
6713
2
thg 3 15
9839
1
thg 10 24
1266