Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2753 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ม.ค. 24
1206
4
ธ.ค. 21
7040
1
ก.ย. 21
6748
2
มี.ค. 15
9851
1
ต.ค. 24
1282