Skip to Content
Menu
This question has been flagged
1 Odpoveď
5780 Zobrazenia

What are the changes for python version 9 compared to version 8 for Odoo ? 

Thanks

Avatar
Zrušiť
Autor

oh ok thanks ! And in the xml view ? You know if something has changed ?

All the old code in the XML views should still work besides of the xpath expression for strings. Either way all the old code will still work there either. I'd advice you to look at official Odoo modules that are written in the Odoo 9 API to get the best samples. :) P.S: if the answer helped you please upvote / accept it.

Best Answer

Hi Coco,

I see your title targets python in V9 but your question might be broader. The Python version used in Odoo V9 is still 2.7 so nothing has changed there. The main change is the new Odoo API V9 and that more modules have been migrated in to the new API. You can still use the old API since they didn't remove it yet, so technically you can code just as you did. I do advise you to use the V8/V9 API though! It is better and Odoo will push out the old API in Odoo V10 (or V11).
Some specific changes that are not related to Python: you can no langer use Xpath expressions with string searches. An example:

<expr="//page[@string='Information']/group">

The @string is no longer supported, so you will have to use other ways such as name or class. There are some minor changes but so far I could write about anything I'd like without problems.

To sum it up in one line: On Python level the only change is the V7 API to the V8/V9 API, but you could still work with the old API if you'd really like to. Pure Python code should work just like it always did.

Yenthe

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
1
máj 16
3719
2
mar 16
3561
2
apr 23
23111
3
jan 24
12578
1
dec 15
5613