Comment 2 for bug 607499

Revision history for this message
jerzyo (jerzyo) wrote :

I do not see any clear example in the standard modules.

For example, in account module one wants to add an extra verification step on the invoices. This verification step checks something (for example if the number of product on product lines is not negative or if payment term in not before current day). This verification should run when the "Confim" button is clicked. The common way to report such error is to raise osv.except_osv().

This works well unless you change the partner address to a non-default on. If you chose a partner, the address is filled by its default address, but you can change it. If you changed it and them make an error, and click on confirm button, and the error is raised, the info is displayed and afterwards you can go back to the form, but when you go back to the form in web_client, the onchange function of the partner field is called which settles the value of partner address to default.