Odoo Help

0

Display a warning popup in @api.constraint methode

By
Guessoum Abderrahmane
on 3/27/18, 6:03 AM 331 views

Hello,

I'm using Odoo 11 and I want to display a Warning popup in a @api.constraint method. The warning popup that i want to display have two button, the first is an OK button used to ignore the warning and the other one is an Cancel button used attempt the saving operation, it' s similar to the warning popup that odoo use like on the picture below :

<hna tu put the pic using drag/drop>

I searched a lot on the web and I found different proposed solutions like using Wizard, exception.Warning() and osv.except_osv(), but unfortunately no one of this solution gives me exactly what i want.

Any help please ?

0
Palkesh Baraiya
On 3/28/18, 2:22 AM

Hello Guessoum Abderrahmane,


On Particular @api.constrains Method You can not Customise as Per Your Requirement like Add Ok and Cancel Button, It will Only Show Ok and It's Kind of Warning for User.

if you want As per Your Requirement than You must have Use Wizard, and Using Wizard You can Do Anything.

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

Question tools

1 follower(s)

Stats

Asked: 3/27/18, 6:03 AM
Seen: 331 times
Last updated: 3/28/18, 2:22 AM