fields.one2many( 'other.object.name', 'Field relation id', 'Fieldname', optional parameter)
using a one2many relational field type, whats the difference between 'other.object.name' and 'Field relation id'
i know the where to find the 'other.object.name' it is simply the "class" in the python code(module.py) and the "model" in the openerp , but what about the 'Field relation id' where can i find this? Thx in advance..
As one2many fields are not really stored in with all related ids, you have to define a relation field id. This is the many2one field in the 'other.object.name' table, that links to your actual table.
m2o: child_class with field parent_class_id.
o2m: parent_class with field child_class_ids. In this one2many field the 'other.object.name' is the name of the child_class (e.g. child.class) and the 'Field relation id' is parent_class_id.
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
|Asked: 9/2/14, 4:04 AM|
|Seen: 983 times|
|Last updated: 3/16/15, 8:10 AM|