Odoo Help

Welcome!

This community 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.

1

python in v9

By
Coralie Cardon
on 11/12/15, 4:09 AM 588 views

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 ?

BHC SPRL, Coralie Cardon
on 11/12/15, 5:30 AM

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.

Yenthe
on 11/12/15, 7:18 AM
1

Yenthe

--Yenthe--
6676
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 11/12/15, 5:18 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/12/15, 4:09 AM
Seen: 588 times
Last updated: 11/12/15, 10:26 AM