[REF] entrypoint_deployv: Compatible with saas-18.3+ (future odoo-19.0) to use new with-demo parameter#224
Merged
moylop260 merged 1 commit intoVauxoo:mainfrom Jul 30, 2025
Conversation
…0) to use new with-demo parameter Based on the following future change for odoo-19.0: - [[IMP] core: no longer load demo data by default](odoo/odoo#194585) And inspired by original runbot code to set parameters: - https://github.com/odoo/runbot/blob/91834a6b340bb379df06149/runbot/models/build.py#L1164-L1168 We are checking if this new parameter is needed for the odoo deployed in this image
Contributor
|
@moylop260 the new option could be added as a config param instead:
|
Collaborator
Author
|
You have a good point! It could avoid changing the way of creating databases manually if we miss adding the parameter However, future odoo +19.0 will show warnings if a config parameter is unknown
Also, we can not set it directly in the deployv configuration file since the image is used for production But we could use the same way but adding the parameter in the configuration file: configpy = "/home/odoo/instance/odoo/odoo/tools/config.py"
if os.path.isfile(configpy):
with open(configpy) as f_configpy:
for line in f_configpy:
if "--with-demo" in line:
add_configfile_param(os.environ["ODOO_CONF"], "with_demo=True") # TODO: Dev the method
breakBut it should be added only one time similar to: However, it could be a little complex using Let's to maturate it in order to develop the best solution to add it to the configuration file as your good proposal Considering:
|
This file contains hidden or 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
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.
Based on the following future change for odoo-19.0:
And inspired by original runbot code to set parameters:
We are checking if this new parameter is needed for the odoo deployed in this image
This change apply only for runbot and local instances generated with t2d
TODO: