Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
6942 Widoki

Hi Guys,

I need to prompt out a confirmation box whenever a button is created. Anyone know how to do it? Kindly refer to the attached screenshot below.

Thanks.

https://dl.dropboxusercontent.com/u/42025188/confirmation_box.png

Awatar
Odrzuć
Najlepsza odpowiedź

Hello,

        You can create button like,

<button name="btn1" string="Button" type="object" confirm="Are you sure you want to HIT me?" />

 

Thanks,

Ishwar Malvi

Awatar
Odrzuć
Autor

i tried and added the type="object" confirm="Are you sure you want to HIT me?" without success.

Hello, you need to define method for button because you have added type=object, so, in py file...... def btn1(related parameteres....) hope this will help you. Thanks.

Autor

Found the solution. This need to enable debug mode instead of modifying the addons files. Then click edit form view.

Najlepsza odpowiedź

May be this will helpful

 
 

Awatar
Odrzuć
Najlepsza odpowiedź

You need to do this using XML code edit in the appropriate addons which is located in ../odoo-server/addons/

Awatar
Odrzuć
Autor

can guide me which line of code should i edit? is it attrs? thanks.

Autor Najlepsza odpowiedź

Do i need to delete the .pyc file and restart the openerp to take reflect changes on the system? I have done as well.

 

Found the solution. This need to enable debug mode instead of modifying the addons files. Then click edit form view.

 

Thanks for you guys guidance.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
paź 24
1168
2
sty 19
6225
0
mar 15
3422
1
mar 15
8826
1
mar 15
4357