Programmer LiLi
Programmer LiLi

Reputation: 157

TypeError: Model 'purchase.order' does not exist in registry

I have this error in Odoo 11:

  File "/home/omar/odoo/odoo11/odoo/modules/loading.py", line 146, in load_module_graph
    model_names = registry.load(cr, package)
  File "/home/omar/odoo/odoo11/odoo/modules/registry.py", line 250, in load
    model = cls._build_model(self, cr)
  File "/home/omar/odoo/odoo11/odoo/models.py", line 428, in _build_model
    raise TypeError("Model %r does not exist in registry." % name)
TypeError: Model 'purchase.order' does not exist in registry.

Upvotes: 2

Views: 10784

Answers (3)

hdrohit
hdrohit

Reputation: 11

First, check the sequence of the init.py file import class. Make sure you inherit the model, that will be above or prior to the import in the init.py file.

Upvotes: 0

Bang Dinh
Bang Dinh

Reputation: 71

Try to add 'purchase' to 'depends' in your manifest file.

Upvotes: 6

PMN
PMN

Reputation: 493

Install the purchase model in the apps menu, or upgrade it if it is installed.

Upvotes: 0

Related Questions