Hello,
v13
I am overriding create and write methods. I need show message popup if some condition occure, but I don't want to stop running create/write functions. I mean I want to be possible to save obejcts even if popup was shown.
Raising Warnings or Errors not work
Returns action with wizard also look like bad idea.
What to do?
===============================================================
Edit for Hilar's answer
===============================================================
For example the problem is if I have:
def write(self, vals):or
return {'warning': { 'title': "bla bla", 'message': "bla bla" }}
print("THIS WILL NEVER BE PRINTED. BECAUSE I HAVE 'RETURN' STATEMENT BEFORE IT"
return super(Vehicle, self).write(vals)
def write(self, vals):Object will never be saved
raise UserError(_("bla bla"))
print("THIS WILL NEVER BE PRINTED. BECAUSE I HAVE 'RAISE' STATEMENT BEFORE IT"
return super(Vehicle, self).write(vals)