Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix parameter to inject in query needs to be int #1855

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mis_builder_spn_info/models/spn_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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)
Loading