Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
4 Відповіді
7037 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

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.

Автор

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

Найкраща відповідь

May be this will helpful

 
 

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

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

Автор Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
жовт. 24
1273
2
січ. 19
6282
0
бер. 15
3452
1
бер. 15
8937
1
бер. 15
4424