Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
745 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 24
1993
2
thg 6 24
3050
1
thg 12 24
4369
1
thg 12 24
3873
2
thg 1 23
5629