Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
755 Представления

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!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 24
2003
2
июн. 24
3063
1
дек. 24
4379
1
дек. 24
3881
2
янв. 23
5640