Odoo Help


What is Vals and how to use it ?

on 5/11/16, 3:57 PM 397 views

Hello ,

Can you explain the vals i know it a dictionnary ,but i don't know how & wich case to use it


On 5/12/16, 11:42 AM


check this link : 


I think it's what you're looking for. 

On 5/12/16, 12:12 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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)


Asked: 5/11/16, 3:57 PM
Seen: 397 times
Last updated: 5/12/16, 12:22 PM