I'm trying to model a One2One and a one2many relationship for two tables, 
they have self reference.

The tables are like this

    part(pk_id, name) , assembly(fk_part_id, fk_part_id_component, 
comp_quantity)

I have two classes part.py and assembly.py, they inherit from ModelSQL and 
ModelView

   Part():
      pid = 'Integer field'
      name = 'string' Field

   Assembly():
      part_id= fields.One2One( 'inventory.part', 'pid', 'part_id', 
'part_number')
      comp_id = fields.One2Many(inventory.part', 'pid', 'comp_id', 
'comp_id')

I read the docs 
[One2One](http://doc.tryton.org/2.4/trytond/doc/ref/models/fields.html#one2one) 
and
[One2Many](http://doc.tryton.org/2.4/trytond/doc/ref/models/fields.html#one2many),
 
yet I don't fully 
understand the concept of 'origin, 'target', also whats the difference 
between 'relation_name' and 'model_name' 

I run 

    $ trytond -u all -d mydb
 
And get this error:

    AssertionError: add_remove must be a list




-- 
[email protected] mailing list

Reply via email to