This question has been flagged
2 Replies
9989 Views

I've notice in Odoo 8 that some modules already use the new API in places, while other modules still use only the version 7 API. Looking ahead, I'm wondering if version 7 API will even be able to run under Odoo 9. Or will all custom code need to be converted to the newer version of the API?

Avatar
Discard
Best Answer

Well.. we talk about new (v8) and old(v7) api... 
Good notice in v8 both apis are supported, wich makes porting modules from v7 to newer version much easier and faster...
Also.. it makes v8 much slower ... the reason for that is : orm has to check every method if it is old or new style api, and if it is wirtten in old style it rewrites the method to new api and then it executes it.... 

Having all that in mind i can be pretty sure that v9 will not have old style api support 
( and why should it have? by the time of release of stable v9, all developers will already be pretty familiar with new api, most custom modules will be ported to new api, so no need for old style support any more) 

Wich will result in increased overall speed (no more style checks in executing the api methods) and code consitency
 

This is only the way i look at the future of odoo... would also like to read what others think :) 

 

Avatar
Discard
Author

Thank you for the prompt reply, Bole. It will be good to have extra speed. I love to see how much progress is made. It is hard work to keep up with it all... But well worth it!

Best Answer

Odoo announced that the 'new' API would be the ONLY API that was supported at v9 with the statement "Backward compatibility will be removed in version 9. All future modules must be developed using the new API" in the document at https://www.odoo.com/blog/odoo-news-5/post/odoo-8-release-notes-186

Avatar
Discard

And they're now slowly reverting that statement. It will not be removed in V9 and might even still be there at V10! See https://twitter.com/therp_stefan/status/606750366840061952 for example.

I think that it would be better no backward compatibility, above all for the new Odoo developers like me. All existing modules should be ported to the new API, and it wouldn't be neccesary to study the old framework. I only hope that all modules included in Odoo 9 Community edition will be ported to the new API, please!!!.