Skip to content

Commit

Permalink
[FIX] financial report
Browse files Browse the repository at this point in the history
  • Loading branch information
odoomates committed Mar 14, 2022
1 parent a8b2b82 commit ed877de
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion accounting_pdf_reports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@


def _pre_init_clean_m2m_models(cr):
cr.execute("""DROP TABLE IF EXISTS account_journal_account_report_partner_ledger_rel""")
cr.execute("""DROP TABLE IF EXISTS account_journal_account_report_partner_ledger_rel""")
2 changes: 1 addition & 1 deletion accounting_pdf_reports/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
'name': 'Odoo 15 Accounting Financial Reports',
'version': '15.0.7.3.0',
'version': '15.0.7.4.0',
'category': 'Invoicing Management',
'description': 'Accounting Reports For Odoo 15, Accounting Financial Reports, '
'Odoo 15 Financial Reports',
Expand Down
5 changes: 5 additions & 0 deletions accounting_pdf_reports/doc/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Module <accounting_pdf_reports>

#### 11.03.2022
#### Version 15.0.7.4.0
##### FIX
- general ledger filter

#### 11.03.2022
#### Version 15.0.7.3.0
##### REV
Expand Down
12 changes: 6 additions & 6 deletions accounting_pdf_reports/report/report_general_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ def _get_account_move_entry(self, accounts, analytic_account_ids,

# Prepare initial sql query and Get the initial move lines
if init_balance:
context = {
'date_from': self.env.context.get('date_from'),
'date_to': False,
'initial_bal': True,
}
context = dict(self.env.context)
context['date_from'] = self.env.context.get('date_from')
context['date_to'] = False
context['initial_bal'] = True
if analytic_account_ids:
context['analytic_account_ids'] = analytic_account_ids
if partner_ids:
Expand Down Expand Up @@ -79,11 +78,12 @@ def _get_account_move_entry(self, accounts, analytic_account_ids,
sql_sort = 'j.code, p.name, l.move_id'

# Prepare sql query base on selected parameters from wizard
context = {}
context = dict(self.env.context)
if analytic_account_ids:
context['analytic_account_ids'] = analytic_account_ids
if partner_ids:
context['partner_ids'] = partner_ids
# tables, where_clause, where_params = MoveLine._query_get()
tables, where_clause, where_params = MoveLine.with_context(context)._query_get()
wheres = [""]
if where_clause.strip():
Expand Down

0 comments on commit ed877de

Please sign in to comment.