I want to create a superclass that has a one2many relationship with the message dummy.one . So every subclass that inherits superclass will have one2many relationship with dummy.one . The problem is declaring a one2many relationship forces me to specify a foreign key that binds dummy.one to superclass . Thus, I need to create a many2one relationship (foreign key) in dummy.one for each subclass I subclass .
The only trick that works is that I create a many2many relationship instead of one2many .
Here is an example:
'dummies' : fields.one2many('dummy.one','foreign_key','Dummies'),
Many2Many:
'dummies' : fields.many2many('dummy.one',string='Dummies'),
Is there a better way to achieve the same effect as many2many without declaring the many2one field in dummy.one for each subclass ?
python openerp odoo odoo-8
William
source share