From 12bb250df96345e481aa5004fd28a031e08c77e2 Mon Sep 17 00:00:00 2001 From: David Wulliamoz Date: Wed, 6 Mar 2024 12:23:44 +0100 Subject: [PATCH] fix --- mis_builder_spn_info/models/spn_info.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mis_builder_spn_info/models/spn_info.py b/mis_builder_spn_info/models/spn_info.py index 60428c8a9..ad3d7ebde 100644 --- a/mis_builder_spn_info/models/spn_info.py +++ b/mis_builder_spn_info/models/spn_info.py @@ -111,11 +111,11 @@ class MisSpnInfo(models.Model): def init(self): param_obj = self.env["ir.config_parameter"] - mis_contract_created_id = param_obj.get_param("mis_contract_created_id") + mis_contract_created_id = int(param_obj.get_param("mis_contract_created_id")) mis_main_company_id = self.env["res.company"].browse( param_obj.get_param("mis_main_company_id") ) - mis_child_sponsored_id = param_obj.get_param("mis_child_sponsored_id") + mis_child_sponsored_id = int(param_obj.get_param("mis_child_sponsored_id")) script = opj(os.path.dirname(__file__), "spn_info.sql") currency = ( self.env["res.company"] @@ -128,15 +128,15 @@ def init(self): params = ( mis_child_sponsored_id, currency, - mis_main_company_id.id, + int(mis_main_company_id.id), mis_child_sponsored_id, currency, - mis_main_company_id.id, + int(mis_main_company_id.id), mis_contract_created_id, currency, - mis_main_company_id.id, + int(mis_main_company_id.id), mis_contract_created_id, currency, - mis_main_company_id.id, + int(mis_main_company_id.id), ) self.env.cr.execute(sql, params)