acsone / click-odoo

Run python scripts in a Odoo environment
GNU Lesser General Public License v3.0
111 stars 43 forks source link

saas releases support #46

Open yelizariev opened 2 years ago

yelizariev commented 2 years ago

Hello!

I'm using doodba and got the following error on running in saas release:

Traceback (most recent call last):
  File "/usr/local/bin/click-odoo-initdb", line 5, in <module>
    from click_odoo_contrib.initdb import main
  File "/usr/local/lib/python3.8/site-packages/click_odoo_contrib/initdb.py", line 14, in <module>
    import click_odoo
  File "/usr/local/lib/python3.8/site-packages/click_odoo/__init__.py", line 4, in <module>
    from .compat import odoo  # noqa
  File "/usr/local/lib/python3.8/site-packages/click_odoo/compat.py", line 33, in <module>
    if odoo_version_info < (10, 0):
TypeError: '<' not supported between instances of 'str' and 'int'

https://github.com/odoo/odoo/blob/saas-15.2/odoo/release.py#L15

version_info = ('saas~15', 2, 0, FINAL, 0, '')

Related code:

https://github.com/acsone/click-odoo/blob/39c9bf9ef5a4944cd7db91d2c785ff6b9f2274cb/click_odoo/compat.py#L33-L41

sbidoul commented 2 years ago

Yeah, but... I'm not too inclined to add complexity in this project to support an exotic version naming that is only used internally at Odoo SA. I'd rather see Odoo simplify the scheme, unless this is done by design so the sass version are not used accidentally outside Odoo SA.

sbidoul commented 2 years ago

Tentatively marking as wont fix, but I'm always open to debate, of course :)