Ir al contenido
Menú
Se marcó esta pregunta
435 Vistas

Environment:
Working in Odoo.sh 18.0 on a shared hosting.


Question:
How can I modify default settings through my module?
In example the setting "Sales>Product Catalog>Variant Grid Entry" has a field "module_sale_product_matrix" (as seen through the computed Arch)
This field can be activated by loading in the module "sale_product_matrix" in the manifest 
(easy to figure out as to just remove "module_" from the naming)

But how to load the setting "Sales>Product Catalog>Units of Measure" which has field "group_uom"?


Reasoning:

In my Development branch I want the same settings as in Productrion and Staging.
Because now I need to set them at each commit which causes a build and thus wipes the settings.

Tried:

​1. models.TransientModel

Creating a class with the field to overwrite the "group_uom" value​

​2. JupyterLab

​config_settings = env['ir.config_parameter'].sudo() #'res.config.settings' didn't work either.

​config_settings.set_param('group_uom', '1')


Any feedback would be helpfull, thanks in advance!

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 24
1523
2
jun 24
2630
1
dic 24
3967
1
dic 24
3417
2
ene 23
5358