Hello ,
Can you explain the vals i know it a dictionnary ,but i don't know how & wich case to use it
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello ,
Can you explain the vals i know it a dictionnary ,but i don't know how & wich case to use it
Thanks
Hi,
check this link :
https://www.odoo.com/fr_FR/forum/aide-1/question/what-does-vals-mean-and-how-to-use-it-in-the-case-of-overriding-the-create-write-methods-101434
I think it's what you're looking for.
Hi PradaOverflow,
We can see the "vals" in Odoo in methods write, create. It is nothing but a dictionary that contains the values of the corresponding record. In create method, it contain all the values of the record we are going to create. The write method is called when we make changes in records. So the "vals" dictionary may contain only those values that we made changes.
Note: We can use any variable instead of "vals" as arguments of create and write methods when overriding those methods. It is the only condition it must be in its position and a dictionary.
Thanks & Regards
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up