Odoo Help


Why are Odoo8 models using the OpenERP v7 API instead Odoo8 API?

Eduardo BP
on 5/1/15, 1:41 PM 974 views


I'm developing for Odoo version 8 in Ubuntu, and I have realized that the modules included in Odoo, e.g website_sale, incorporate models whose source code uses the OpenERP v7 API.

I think that it is not good for developers because if I needed to study the source code from models included in Odoo v8, I would have to learn the OpenERP v7 API, apart from the Odoo v8 API.

Why aren't modules included in Odoo8 by default implemented using the Odoo v8 API?.


Hi, New module are in new API. Some module are migrate when a refactor to improve code are done... Others modules are migrate one by one...

Jérémy Kersten (jke)
on 5/1/15, 1:46 PM

Thanks for your answer Jérémy. What modules are new in Odoo 8?. I had been watching the models source code from crm, calendar and hr modules, but I think that they are still using the old API.

Eduardo BP
on 5/1/15, 2:17 PM

Hi, you can grep "from openerp import.*api" to find python file using new api (full or partially). Else, module like event eg are already migrate in new api ...

Jérémy Kersten (jke)
on 5/1/15, 2:22 PM

Sorry for my inexperienced, but I suppose you wanted to write down "from openerp import api", didn't you?. I'm using this import in Pycharm IDE, but after this I don't know what I must do to see what modules are implemented in new Odoo api. The PyCharm autocompletation doesn't show any clue about this.

Eduardo BP
on 5/2/15, 8:04 AM

Hi, that was a regexp to match import like "from openerp import models, fields, api, _" But If you want to learn the new API I suggest you to read the documentation https://www.odoo.com/documentation/8.0/howtos/backend.html And if you want to read a real module, take a look in addons/event/event.py

Jérémy Kersten (jke)
on 5/2/15, 11:06 AM

If I write down in a .py file from an Odoo project the import "from openerp import.*api", PyCharm IDE gives me an error. Instead, with the import "from openerp import models, fields, api, _" no errors occur.

Eduardo BP
on 5/2/15, 12:22 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 5/1/15, 1:41 PM
Seen: 974 times
Last updated: 5/2/15, 12:22 PM