Odoo Help

3

1
1 Answer
8
Avatar

Andreas Brueckl Austria

--Andreas Brueckl--

5536
| 8 8 9
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl Austria
3/28/13, 3:16 PM

For buttons there exists the attribute confirm. When this attribute is set, then when the button is pressed a dialog box appears before the action is processed.

In the case of the Sales Quotation you can change the following line of the form view to implement a dialog box:

 <button name="cancel" states="draft,sent" string="Cancel" groups="base.group_user"/>

to

 <button name="cancel" states="draft,sent" string="Cancel" confirm="Are you sure you want to cancel this quotation?" groups="base.group_user"/>

image description

2 Comments
Lawrence
8/7/13, 9:12 AM

Hi Andreas, thank you for this excellent answer. I am hoping to put this modification into a patch (so that I do not need to make the change each time I update the code). If you are able to help, please see http://help.openerp.com/question/27344/is-there-a-beginners-guide-to-writing-a-patch/. Thanks!

Lawrence
2/25/14, 6:52 AM

I have read into this some more and the way to ensure that changes remain even after updating is to create a new view which inherits the existing view.

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now