acsone / click-odoo-contrib

Useful Odoo scripts and utility functions, based on click-odoo
GNU Lesser General Public License v3.0
107 stars 59 forks source link

Fix click-odoo-update for odoo 15 #122

Closed kafai-lam closed 2 years ago

kafai-lam commented 2 years ago

This PR is going to fix issue since #119

Assume we are using Odoo 15, now we have odoo.tools.parse_version("15") < odoo.tools.parse_version(odoo.release.version) < odoo.tools.parse_version("16")

Then that condition will return false and _is_installable will also return false since get_manifest doesn't exists in Odoo 15

So it is better to change the expression to odoo.tools.parse_version(odoo.release.version) < odoo.tools.parse_version("16") to include all Odoo 15 version

codecov-commenter commented 2 years ago

Codecov Report

Merging #122 (4c3d32e) into master (0ce510d) will decrease coverage by 1.13%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
- Coverage   92.61%   91.47%   -1.14%     
==========================================
  Files          13       13              
  Lines         880      880              
  Branches      189      154      -35     
==========================================
- Hits          815      805      -10     
- Misses         44       52       +8     
- Partials       21       23       +2     
Impacted Files Coverage Δ
click_odoo_contrib/update.py 84.52% <0.00%> (-1.79%) :arrow_down:
click_odoo_contrib/dropdb.py 75.00% <0.00%> (-20.84%) :arrow_down:
click_odoo_contrib/initdb.py 94.87% <0.00%> (-1.03%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kafai-lam commented 2 years ago

@sbidoul the current odoo 16 version is 16.0beta, it makes odoo.tools.parse_version("16.0beta") < odoo.tools.parse_version("16")

The real minimal odoo 16 version should be 16dev

sbidoul commented 2 years ago

The test failure is unrelated, so merging.

sbidoul commented 2 years ago

Thanks for helping.