Lakshminarayanan
Lakshminarayanan

Reputation: 320

Relation _unknown error in odoo 10?

field definition:

department_id = fields.Many2one('partner.department',string="Department", compute="_get_product_department",store=True,required=True) 

view definition:

<field name="department_id"  />

ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown"."id" as "id" FROM "_unknown"

Upvotes: 1

Views: 1908

Answers (2)

Mohd. Shoaib
Mohd. Shoaib

Reputation: 11

Things which you can check are 1.) put the relation module in depends. 2.) Upgrade the module of which you are trying to add relation.

In my case my issue was resolved when i upgraded the module which was of M2O relation.

Lets say my custom.model is in module named 'my_module'

eg.) dept = fields.Many2one('custom.model', 'Relation Example')

I upgraded my_module and issue was resolved.

Upvotes: 1

Lakshminarayanan
Lakshminarayanan

Reputation: 320

i solved this problem, partner.department model is another module so i added that module name into manifest.py file in depend section..

Upvotes: 0

Related Questions