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 override create or write method

Noble Man
on 6/18/15, 9:24 AM 1,085 views

i have two class x and y

class x_obj(osv.osv):

   _columns ={

        fields ..........




class y_obj(osv.osv):

_columns ={

fields ..........

y_id:fields.one2many('x.obj', 'x_id', 'x_child'),



I have form view that retrieves all records in x_obj table based on certain condition 

but what i am facing is i don't want a new record to be created in x_table except y_obj's reference only to be updated in existing x_object table records when i save the record in y_obj, and how can really retrieve child x_obj's id through  y_id field i can access all fields but i couldn't get x_obj's id through one2many field reference 



| 5 2 5
kerala, India

Working as a Odoo Functional and Technical Expert

On 6/18/15, 12:10 PM

Please Check existing Answers check in Google or check in help forrum.Its a duplicate question,

Just call the super of parent class


Burhan Vakharia
On 11/26/15, 2:40 AM

Learn how to override create method in Odoo v8 using API with example,


Learn how to override write method in Odoo v8 using API with example,


Noble Man
On 6/19/15, 8:13 AM

@Dep Thanks for your help but the link you referred is not helping me in my case, I am in y_obj's form and wants change the status for created records in x_obj  (using one2may reference) table but instead it is creating a new record with updated state and x_id but what i want is i only wanted the state to be changed and the reference id which is x_id

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/18/15, 9:24 AM
Seen: 1085 times
Last updated: 11/26/15, 2:40 AM