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] account: ensure non empty VALUES in query #162043

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/account/report/account_invoice_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _from(self):
AND product_standard_price.company_id = line.company_id
JOIN {currency_table} ON currency_table.company_id = line.company_id
'''.format(
currency_table=self.env['res.currency']._get_query_currency_table(self.env.companies.ids, fields.Date.today())
currency_table=self.env['res.currency']._get_query_currency_table((self.env.companies | self.env.company).ids, fields.Date.today())
)

@api.model
Expand Down
2 changes: 1 addition & 1 deletion addons/pos_sale/report/sale_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _from_pos(self):
LEFT JOIN stock_picking_type picking ON picking.id = config.picking_type_id
JOIN {currency_table} ON currency_table.company_id = pos.company_id
""".format(
currency_table=self.env['res.currency']._get_query_currency_table(self.env.companies.ids, fields.Date.today())
currency_table=self.env['res.currency']._get_query_currency_table((self.env.companies | self.env.company).ids, fields.Date.today())
)

def _where_pos(self):
Expand Down
2 changes: 1 addition & 1 deletion addons/purchase/report/purchase_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _from(self):
left join uom_uom product_uom on (product_uom.id=t.uom_id)
left join {currency_table} ON currency_table.company_id = po.company_id
""".format(
currency_table=self.env['res.currency']._get_query_currency_table(self.env.companies.ids, fields.Date.today())
currency_table=self.env['res.currency']._get_query_currency_table((self.env.companies | self.env.company).ids, fields.Date.today())
)
return from_str

Expand Down
2 changes: 1 addition & 1 deletion addons/sale/report/sale_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def _from_sale(self):
LEFT JOIN uom_uom u2 ON u2.id=t.uom_id
JOIN {currency_table} ON currency_table.company_id = s.company_id
""".format(
currency_table=self.env['res.currency']._get_query_currency_table(self.env.companies.ids, fields.Date.today())
currency_table=self.env['res.currency']._get_query_currency_table((self.env.companies | self.env.company).ids, fields.Date.today())
)

def _where_sale(self):
Expand Down