Hope you will be fine
i am working on odoo from last 4 to 5 months
when i use 'odoo.exception' for raising an validationError as a popup for showing Warnings,odoo works fine and show the popup and after raising Error, it stop execution and when we press "OK" it reruns the program. in this case everything works fine.
i want that when I Raises the ValidationError after that i want to write some data into field how i can do that
i have tried with "TRY EXCEPT FINALLY" block For Example
i have Char type Field
test = fields.Char()
@api.onchange('test')
def _change_value(self):
try:
self.test = 2
except:
raise ValidationError("Pop up")
else:
pass
finally:
self.test = 'gggg'