Skip to content

[20.0][MIG] server_environment: Migration to 20.0 - #307

Open
rven wants to merge 121 commits into
OCA:20.0from
DynAppsNV:20.0-mig-server_environment
Open

rven wants to merge 121 commits into
OCA:20.0from
DynAppsNV:20.0-mig-server_environment

Conversation

@rven

@rven rven commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Standard migration to 20.0, plus two fixes for 20.0 ORM changes in dynamically added fields:

  • server.config: register the generated fields with __set_name__ (20.0 requires _module).
  • server.env.mixin: add the generated *_env_default / *_env_is_editable fields to _fields_update_order__.

Also: ir.access.csv, web added to depends (tests use Form), ruff fixes.

Changes reviewed and tested by me.

Assisted-by: Claude Opus 5.5

jgrandguillaume and others added 30 commits October 5, 2026 10:11
(lp:c2c-addons/6.1  rev 11)
(lp:c2c-addons/6.1  rev 28.1.1)
…t is the blessed target.

(lp:c2c-addons/6.1  rev 40.2.1)
(lp:c2c-addons/6.1  rev 45.1.4)
…TK client, because for 6.1 the web client is the blessed target.

(lp:c2c-addons/6.1  rev 116)
This fixes OCA/server-tools#125 because in some Ubuntu systems
lsb_release outputs to stderr as well as stdout. This message will be
printed to console, not logged nor shown among server infomation. That
way the message is lost and only pollutes unit tests output.
In order to get visibility on https://www.odoo.com/apps the OCA board has
decided to add the OCA as author of all the addons maintained as part of the
association.
* [IMP] load server environment options from odoo rcfile

This allows delivering the code with default configuration options for
all environments in the server_environment_file module, but letting
the administrator override some configuration entries in the regular
odoo configuration file.

* server_environment_file: update README
To trigger rebuild following change in setup.py
@rven
rven force-pushed the 20.0-mig-server_environment branch from de83b9e to efdd250 Compare October 5, 2026 10:57
rven added a commit to DynAppsNV/server-env that referenced this pull request Oct 5, 2026
From Python 3.14 on, partialmethod is constructed in __new__ instead of
__init__, so overriding __init__ to pop a __name__ keyword raises a
TypeError. Don't override the constructor: set __name__ on the instance
after creating it.

Assisted-by: Claude Opus 5.5
@rven
rven force-pushed the 20.0-mig-server_environment branch from bf7f4b1 to f04f6f0 Compare October 7, 2026 09:58
@rven

rven commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@jgrandguillaume @sbidoul @pedrobaeza I'm reaching to you regarding the issue I ran up when migrating this module to v20
For v20 I'm using python 3.14, so the migration was done for this version.
When I used the module in an env with python 3.12 I ran into the following issue: f04f6f0
Shouldn't the modules be tested in the CI pipelines towards different python versions also?
Just opening the question here, because it will become more relevant in the future.

I don't know if you are the right people for this question, otherwise forward it to who it belongs to.

@pedrobaeza

Copy link
Copy Markdown
Member

The CI runs in the same Python version as Odoo runs its runbot, as it's fixed to just that version. I recommend you to use that version as well, or you'll find troubles like the mentioned one, but not only with OCA, but with Odoo core itself. The same applies to the versions of the Python libraries.

@rven

rven commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@pedrobaeza I don't fully agree with this remark.

https://github.com/odoo/odoo/blob/20.0/odoo/release.py#L39C1-L40C25

MIN_PY_VERSION = (3, 12)
MAX_PY_VERSION = (3, 14)

So the modules should work on 3.12, 3.13 and 3.14

@pedrobaeza

Copy link
Copy Markdown
Member

Yes, theoretically, but with nobody testing that, you shouldn't risk. As said, Odoo core is not being tested in another Python version. I don't think the benefits (which ones?) of using Python 3.14 will worth the possible problems.

@rven

rven commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author
image image Odoo is using 3.14 on Ubuntu 26.04 LTS in there CI pipelines

@pedrobaeza

Copy link
Copy Markdown
Member

They usually align with Debian, not Ubuntu, but if that's the case, then runboat should also launch Python 3.14 for being aligned. cc @sbidoul @petrus-v @etobella

@etobella

etobella commented Oct 8, 2026

Copy link
Copy Markdown
Member

Well, here it is an interesting point... Well, when we set the version of python to use, we usually set the minor version provided by odoo. At some points we discussed if we should increase the number of versions tested, however, if we increase the number of CIs, it will be slower and we could achieve the limits of concurrent CI more often.

This kind of problems are not usual and maybe it should have sense to have that in some specific repos, like this one, server repositories, rest-framework connector or queue_job 🤔

david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 9, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 9, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 9, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 15, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 15, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 26, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 26, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 27, 2026
david-banon-tecnativa added a commit to Tecnativa/doodba that referenced this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:server_environment Module server_environment series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.