-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] theme_*: register unused configurator snippets #751
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When shapes were extracted to configurator snippets in [1], some configurator-specific snippets were created that do not appear on pages of the specific theme. Because in [2] the call to `_generate_primary_snippet_templates` is done on a full list of themes instead of only the installed ones, the problem was not noticed: if any theme defines a block, it's website-side configurator-specific template is generated. This is not the case during an upgrade: the templates are generated only for the installed themes. Because of this some "useless" configurator templates trigger an error when importing their XML definition because their parent template does not exist. This commit fixes this by adding those templates in a pseudo page `_` in the `configurator_snippets` entry of each theme's manifest. In master, the templates will be removed instead. [1]: odoo@d206c11 [2]: odoo/odoo@928eeca#diff-f49a1e9eda23df9f1d48121ba376a5fabafe70ea18b29d4eab23d737e5d4eeb6R446
rdeodoo
approved these changes
Dec 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robodoo r+
I asked for a nightly single build per theme https://discord.com/channels/678381219515465750/704997651833159831/1180123592533483550
@bso-odoo @rdeodoo linked pull request(s) odoo/odoo#144222 not ready. Linked PRs are not staged until all of them are ready. |
robodoo
pushed a commit
to odoo/odoo
that referenced
this pull request
Dec 1, 2023
During upgrades, customization modules are defined in the database but their codebase is not in the addons path. Because of this, when running an upgrade the manifest of such modules does not exist which makes `_generate_primary_snippet_templates` fail because it cannot locate some default keys. This commit adapts the access to the manifest in order to use a default value in case the manifest is not available. closes #144222 Related: odoo/design-themes#751 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
robodoo
pushed a commit
that referenced
this pull request
Dec 1, 2023
When shapes were extracted to configurator snippets in [1], some configurator-specific snippets were created that do not appear on pages of the specific theme. Because in [2] the call to `_generate_primary_snippet_templates` is done on a full list of themes instead of only the installed ones, the problem was not noticed: if any theme defines a block, it's website-side configurator-specific template is generated. This is not the case during an upgrade: the templates are generated only for the installed themes. Because of this some "useless" configurator templates trigger an error when importing their XML definition because their parent template does not exist. This commit fixes this by adding those templates in a pseudo page `_` in the `configurator_snippets` entry of each theme's manifest. In master, the templates will be removed instead. [1]: d206c11 [2]: odoo/odoo@928eeca#diff-f49a1e9eda23df9f1d48121ba376a5fabafe70ea18b29d4eab23d737e5d4eeb6R446 closes #751 Related: odoo/odoo#144222 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2 similar comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When shapes were extracted to configurator snippets in 1, some configurator-specific snippets were created that do not appear on pages of the specific theme.
Because in 2 the call to
_generate_primary_snippet_templates
is done on a full list of themes instead of only the installed ones, the problem was not noticed: if any theme defines a block, it's website-side configurator-specific template is generated.This is not the case during an upgrade: the templates are generated only for the installed themes. Because of this some "useless" configurator templates trigger an error when importing their XML definition because their parent template does not exist.
This commit fixes this by adding those templates in a pseudo page
_
in theconfigurator_snippets
entry of each theme's manifest. In master, the templates will be removed instead.