Browse Source

Merge PR #805 into 12.0

Signed-off-by pedrobaeza
12.0
OCA-git-bot 3 years ago
parent
commit
604c6a016a
  1. 9
      account_financial_report/report/trial_balance.py

9
account_financial_report/report/trial_balance.py

@ -391,6 +391,9 @@ AND ra.report_id = %s
def _inject_account_group_values(self):
"""Inject report values for report_trial_balance_account"""
allowed_groups = self.env["account.group"].search([])
if not allowed_groups:
return
query_inject_account_group = """
INSERT INTO
report_trial_balance_account
@ -416,10 +419,14 @@ SELECT
accgroup.code_prefix,
accgroup.level
FROM
account_group accgroup"""
account_group accgroup
WHERE
accgroup.id in %s
"""
query_inject_account_params = (
self.id,
self.env.uid,
tuple(allowed_groups.ids),
)
self.env.cr.execute(query_inject_account_group,
query_inject_account_params)

Loading…
Cancel
Save