Skip to content

[16.0][ADD] image_tag_environment: make server_environment an optional dependency#575

Open
yankinmax wants to merge 2 commits into
OCA:16.0from
camptocamp:16-dr-image_tag
Open

[16.0][ADD] image_tag_environment: make server_environment an optional dependency#575
yankinmax wants to merge 2 commits into
OCA:16.0from
camptocamp:16-dr-image_tag

Conversation

@yankinmax

Copy link
Copy Markdown

PR is aimed to remove server_environment dependency from image_tag in the scope of this issue:

"data": [
"views/image_tag.xml",
],
"auto_install": True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it enough to get it automatically installed on environments where image_tag was already instealled and it only gets an update?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the migration script and it's safe enough. No issues in logs about fields removal or schema change.

@yankinmax yankinmax marked this pull request as draft March 25, 2026 12:56
@ivantodorovich

Copy link
Copy Markdown
Contributor

@etobella this is similar to the one you did for fs_storage #627
WDYT?

[("name", "=", "image_tag_environment"), ("state", "=", "uninstalled")]
)
if module:
module.button_install()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My experience also states that it is nice to get the data and add it to the right field. This happened to me and I would recommend you to do it this way 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which data? the one set in the environment?

The purpose of this script is to install the new split off module, so instances that were configured through the environment remain configurable through env -- by having the new *_environment module automatically installed

Users or sysadmins are expected to explicitly uninstall the *_environment module and re-configure their system.

To make that easier, we're working on this approach:

It's not done in this PR, though. At this stage we want at least to have the modules split.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but it will give you problems when you want to remove the environment, also, it happened to me that I decided to remove the dependancy as it was not required, at that moment, everything failed as the uninstall hook did not pass.... I am just warning, it shouldn't be a big deal to handle in the migration too.

@etobella etobella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me OK, just review my comment if possible 😉

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants