Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1934 Vistas

I've custom module with

"depends": ["sale_management", "mrp"],

 i want to make like when my custom module install it will automatically enable "Multi-Step Routes" in settings, how to configure such a setting by python code.

Avatar
Descartar
Mejor respuesta

You can inherit res.config.settings model and create all the configurations you want.

Example: 

class ResConfigSettings(models.TransientModel):

    _inherit = ["res.config.settings"]


    max_product_registries = fields.Integer(

        string="Max Product Registries",

        default=5000,

        help="Maximum number of product registries to be updated at once.",

        config_parameter="your_module.max_product_registries",

    )

    product_manufacturer_update = fields.Boolean(

        string="Auto-Update Product Manufacturer",

        default=True,

        help="Choose if the products need to be updated with the manufacturer information automatically with the cron action.",

        config_parameter="your_module.product_manufacturer_update",

    )

Avatar
Descartar
Autor

i want to enable "Multi-Step Routes" which was already define in stock module

Publicaciones relacionadas Respuestas Vistas Actividad
0
feb 25
792
1
may 25
749
1
abr 25
551
0
abr 25
537
1
mar 25
773