Reputation: 53
Going crazy:
I'm simply trying to add a many2one field in my custom module. (module from scratch, does not inherit from others or expand others yet).
light_system = fields.Many2one('product.product', string='Lighting System', ondelete='restrict')
when I restart the server I get:
WARNING newtest openerp.fields: Field jobsite.location.light_system with unknown comodel_name 'product.product'
And when I try to select something from that field in a form if fails with:
ProgrammingError: relation "_unknown" does not exist
LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"."id...
The same happens if I use product.template. If i change 'product.product' to 'res.partner' it works just fine (for contacts)...
What am I missing here? I've searched and googled, the lack of like problems makes me think I'm missing something really simple what model am I supposed to use for products?
Upvotes: 0
Views: 4020
Reputation: 31
you will added 'depends' list in openerp.py and then absolute working Fine. Thank You.
Upvotes: 0
Reputation: 53
I was missing the 'product' string in the 'depends' list in openerp.py
Upvotes: 5