For instance: class A(osv.osv): { _name = "objectA" _columns = { 'B_ids': fields.many2many ('objectB', 'objectAB_rel','A_id','B_id', 'Bid'), 'AOtherfield': ... } A()
class B(osv.osv): { _name = "objectB" _columns = { 'A_ids': fields.many2many('objectA', 'objectAB_rel','B_id','A_id', 'Aid'), 'BOtherfield': ... } B() during the module initialization, the above stated class definition will cause the "relation "objectB" does not exist" error. I understand that the error arise because the object A has the B_ids field references to objectB, which however is not initialized yet at the time object A is initializing. The way I did to circumvent the problem is to remove the many2many field from class A, and put it back on after class B in another class which inherited from class A. This is not nice, as far as I can tell. Pls. kindly advise me is there any better way to do such thing. -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=37719#37719 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users