跳至內容
選單
此問題已被標幟
1 回覆
5779 瀏覽次數

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

Thanks

頭像
捨棄
作者

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.

最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 16
3717
2
3月 16
3561
2
4月 23
23111
3
1月 24
12578
1
12月 15
5613