Skip to content
Open
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
3 changes: 3 additions & 0 deletions base_external_dbsource_mssql/models/base_external_dbsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# this is needed to generate connection string
import pymssql
import sqlalchemy
from sqlalchemy import text

from odoo import fields, models

Expand Down Expand Up @@ -34,6 +35,8 @@ def _connection_open_mssql(self):

def _execute_mssql(self, sqlquery, sqlparams, metadata):
rows, cols = list(), list()
# Convert to accepted object by sqlalchemy
sqlquery = text(sqlquery)
for record in self:
with record.connection_open() as connection:
if sqlparams is None:
Expand Down