Tecnativa / doodba

Base image for making the creation of customized Odoo environments a piece of cake
Apache License 2.0
432 stars 304 forks source link

Deploying Odoo V12 in test environment fails due to f-strings not supported on python 3.5 #491

Closed ssaid closed 2 years ago

ssaid commented 2 years ago

Odoo started to use the f-strings in v12: https://github.com/odoo/odoo/blob/12.0/addons/microsoft_outlook/controllers/main.py#L76 so maybe it is necessary to upgrade python version to the one that added the f-string feature: 3.6 I don't know if this an error of odoo ce, because in their setup.py they specified python version >= 3.5 Shall I do a pull request to start using Python 3.6 or do some "trick" to overcome this error ?

To Reproduce

Affected versions: 12.0

Steps to reproduce the behavior:

  1. Clone a doodba project
  2. docker-compose build --pull (using test.yaml)
`*** Error compiling '/opt/odoo/custom/src/odoo/addons/microsoft_outlook/controllers/main.py'...
  File "/opt/odoo/custom/src/odoo/addons/microsoft_outlook/controllers/main.py", line 76
    return werkzeug.utils.redirect(f'/web?#id={rec_id}&model={model_name}&view_type=form', 303)
                                                                                        ^
SyntaxError: invalid syntax

Traceback (most recent call last):
  File "/opt/odoo/common/build", line 30, in <module>
    subprocess.check_call(command)
  File "/usr/local/lib/python3.5/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/odoo/common/build.d/500-compile' returned non-zero exit status 1
`

Expected behavior Be ready to launch container with docker-compose up -d

Additional context Debian 9.4, Docker version 19.03.15, build 99e3ed8919, Python @ container: 3.5.10

pedrobaeza commented 2 years ago

This is not a problem of Doodba, but Odoo itself:

https://github.com/odoo/odoo/pull/87389