Odoo Help


This community 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.


How to access a record just created by overriding Create method ?

on 6/30/15, 4:21 AM 423 views

When clicking the Save button on a form, I understood the Create method is executed. So all models on the form are automatically linked together (according to foreign keys) and saved in the database ?

I'm trying, by overriding Create method, to modify some behaviours and I need to get new records from the form inside the method. However, I suppose there is no ID until the end of the transaction which appends at the end of the method.

Maybe I'm totally wrong, all this is new for me.

EDIT: Looks like the "vals" parameter of Create method contains the values of all fields, so if I change values of vals, records will be saved with my new values I suppose.

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 6/30/15, 4:21 AM
Seen: 423 times
Last updated: 6/30/15, 5:13 AM