[FIX] sale_management: do not override execute in res_config_settings
The execute method of res_config settings must not be overridden. set_values() must be overridden because the uninstall must be done at the end of transaction. closes odoo/odoo#56101 Taskid: 2282427 X-original-commit: 6d6227915539c7af10e7e2b23565baea602a1d82 Related: odoo/enterprise#12504 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
@@ -19,10 +19,10 @@ class ResConfigSettings(models.TransientModel):
|
||||
if not self.group_sale_order_template:
|
||||
self.module_sale_quotation_builder = False
|
||||
|
||||
def execute(self):
|
||||
def set_values(self):
|
||||
if not self.group_sale_order_template:
|
||||
self.company_so_template_id = None
|
||||
self.env['res.company'].sudo().search([]).write({
|
||||
'sale_order_template_id': False,
|
||||
})
|
||||
return super(ResConfigSettings, self).execute()
|
||||
return super(ResConfigSettings, self).set_values()
|
||||
|
||||
Reference in New Issue
Block a user