[REF] entrypoint_deployv: Compatible with saas-18.3+ (future odoo-19.0) to use new with-demo parameter - #224
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
|
@moylop260 the new option could be added as a config param instead:
|
|
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:
|
Starting from Odoo 19.0, the with_demo parameter is automatically added to the configuration file with a value of False. Force it to True with sed to preserve the expected behavior of installing with demonstration data. Also, reverted [REF] entrypoint_deployv: Compatible with saas-18.3+ (future odoo-19.0) to use new with-demo parameter (Vauxoo#224) This reverts commit caa9c7a and PR Vauxoo#224 Since it is enabling the same parameter from command instead But changing the Odoo config file is enough
|
FYI devops is adding So, now we can use your good approach |
Starting from Odoo 19.0, the with_demo parameter is automatically added to the configuration file with a value of False. Force it to True with sed to preserve the expected behavior of installing with demonstration data. Also, reverted [REF] entrypoint_deployv: Compatible with saas-18.3+ (future odoo-19.0) to use new with-demo parameter This reverts commit caa9c7a and PR #224 Since it is enabling the same parameter from command instead But changing the Odoo config file is enough
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: