diff --git a/account_financial_report_qweb/__manifest__.py b/account_financial_report_qweb/__manifest__.py
index b55996e7..9f37617d 100644
--- a/account_financial_report_qweb/__manifest__.py
+++ b/account_financial_report_qweb/__manifest__.py
@@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'QWeb Financial Reports',
- 'version': '10.0.1.5.3',
+ 'version': '10.0.2.0.0',
'category': 'Reporting',
'summary': 'OCA Financial Reports',
'author': 'Camptocamp SA,'
@@ -16,6 +16,7 @@
"website": "https://odoo-community.org/",
'depends': [
'account',
+ 'account_group', # account-financial-tools
'date_range',
'report_xlsx',
'report',
diff --git a/account_financial_report_qweb/models/account_group.py b/account_financial_report_qweb/models/account_group.py
new file mode 100644
index 00000000..307cf45c
--- /dev/null
+++ b/account_financial_report_qweb/models/account_group.py
@@ -0,0 +1,31 @@
+# coding: utf-8
+# Copyright 2018 Eficent
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
+from odoo import api, fields, models
+
+
+class AccountGroup(models.Model):
+ _inherit = 'account.group'
+
+ group_child_ids = fields.One2many(
+ comodel_name='account.group',
+ inverse_name='parent_id',
+ string='Child Groups')
+
+ compute_account_ids = fields.Many2many(
+ 'account.account',
+ compute='_compute_group_accounts',
+ string="Accounts", store=True)
+
+ @api.multi
+ @api.depends('code_prefix', 'account_ids', 'account_ids.code',
+ 'group_child_ids', 'group_child_ids.account_ids.code')
+ def _compute_group_accounts(self):
+ account_obj = self.env['account.account']
+ accounts = account_obj.search([])
+ for group in self:
+ prefix = group.code_prefix if group.code_prefix else group.name
+ gr_acc = accounts.filtered(
+ lambda a: a.code.startswith(prefix)).ids
+ group.compute_account_ids = [(6, 0, gr_acc)]
diff --git a/account_financial_report_qweb/report/abstract_report_xlsx.py b/account_financial_report_qweb/report/abstract_report_xlsx.py
index 16114503..275201f2 100644
--- a/account_financial_report_qweb/report/abstract_report_xlsx.py
+++ b/account_financial_report_qweb/report/abstract_report_xlsx.py
@@ -23,6 +23,7 @@ class AbstractReportXslx(ReportXlsx):
# Formats
self.format_right = None
+ self.format_left = None
self.format_right_bold_italic = None
self.format_bold = None
self.format_header_left = None
@@ -43,6 +44,7 @@ class AbstractReportXslx(ReportXlsx):
self._define_formats(workbook)
report_name = self._get_report_name()
+ report_footer = self._get_report_footer()
filters = self._get_report_filters(report)
self.columns = self._get_report_columns(report)
@@ -57,6 +59,8 @@ class AbstractReportXslx(ReportXlsx):
self._generate_report_content(workbook, report)
+ self._write_report_footer(report_footer)
+
def add_sheet(self, workbook, sheet_name):
return workbook.add_worksheet(sheet_name)
@@ -80,6 +84,7 @@ class AbstractReportXslx(ReportXlsx):
"""
self.format_bold = workbook.add_format({'bold': True})
self.format_right = workbook.add_format({'align': 'right'})
+ self.format_left = workbook.add_format({'align': 'left'})
self.format_right_bold_italic = workbook.add_format(
{'align': 'right', 'bold': True, 'italic': True}
)
@@ -107,6 +112,9 @@ class AbstractReportXslx(ReportXlsx):
self.format_amount = workbook.add_format()
self.format_amount.set_num_format(
'#,##0.'+'0'*currency_id.decimal_places)
+ self.format_amount_bold = workbook.add_format({'bold': True})
+ self.format_amount_bold.set_num_format(
+ '#,##0.'+'0'*currency_id.decimal_places)
self.format_percent_bold_italic = workbook.add_format(
{'bold': True, 'italic': True}
)
@@ -135,6 +143,18 @@ class AbstractReportXslx(ReportXlsx):
)
self.row_pos += 3
+ def _write_report_footer(self, footer):
+ """Write report footer .
+ Columns are defined with `_get_report_columns` method.
+ """
+ if footer:
+ self.row_pos += 1
+ self.sheet.merge_range(
+ self.row_pos, 0, self.row_pos, len(self.columns) - 1,
+ footer, self.format_left
+ )
+ self.row_pos += 1
+
def _write_filters(self, filters):
"""Write one line per filters on starting on current line.
Columns number for filter name is defined
@@ -188,10 +208,20 @@ class AbstractReportXslx(ReportXlsx):
value = getattr(line_object, column['field'])
cell_type = column.get('type', 'string')
if cell_type == 'string':
- self.sheet.write_string(self.row_pos, col_pos, value or '')
+ if hasattr(line_object, 'account_group_id') and \
+ line_object.account_group_id:
+ self.sheet.write_string(self.row_pos, col_pos, value or '',
+ self.format_bold)
+ else:
+ self.sheet.write_string(self.row_pos, col_pos, value or '')
elif cell_type == 'amount':
+ if hasattr(line_object, 'account_group_id') and \
+ line_object.account_group_id:
+ cell_format = self.format_amount_bold
+ else:
+ cell_format = self.format_amount
self.sheet.write_number(
- self.row_pos, col_pos, float(value), self.format_amount
+ self.row_pos, col_pos, float(value), cell_format
)
elif cell_type == 'amount_currency':
if line_object.currency_id:
@@ -288,10 +318,16 @@ class AbstractReportXslx(ReportXlsx):
def _get_currency_amt_format(self, line_object):
""" Return amount format specific for each currency. """
- format_amt = getattr(self, 'format_amount')
+ if hasattr(line_object, 'account_group_id') and \
+ line_object.account_group_id:
+ format_amt = getattr(self, 'format_amount_bold')
+ field_prefix = 'format_amount_bold'
+ else:
+ format_amt = getattr(self, 'format_amount')
+ field_prefix = 'format_amount'
if line_object.currency_id:
field_name = \
- 'format_amount_%s' % line_object.currency_id.name
+ '%s_%s' % (field_prefix, line_object.currency_id.name)
if hasattr(self, field_name):
format_amt = getattr(self, field_name)
else:
@@ -333,6 +369,13 @@ class AbstractReportXslx(ReportXlsx):
"""
raise NotImplementedError()
+ def _get_report_footer(self):
+ """
+ Allow to define the report footer.
+ :return: the report footer
+ """
+ return False
+
def _get_report_columns(self, report):
"""
Allow to define the report columns
diff --git a/account_financial_report_qweb/report/general_ledger.py b/account_financial_report_qweb/report/general_ledger.py
index a9a79fd3..bb8768e3 100644
--- a/account_financial_report_qweb/report/general_ledger.py
+++ b/account_financial_report_qweb/report/general_ledger.py
@@ -29,7 +29,7 @@ class GeneralLedgerReport(models.TransientModel):
date_to = fields.Date()
fy_start_date = fields.Date()
only_posted_moves = fields.Boolean()
- hide_account_balance_at_0 = fields.Boolean()
+ hide_account_at_0 = fields.Boolean()
foreign_currency = fields.Boolean()
show_analytic_tags = fields.Boolean()
company_id = fields.Many2one(comodel_name='res.company')
@@ -552,7 +552,7 @@ WHERE
OR f.balance IS NOT NULL AND f.balance != 0
)
"""
- if self.hide_account_balance_at_0:
+ if self.hide_account_at_0:
query_inject_account += """
AND
f.balance IS NOT NULL AND f.balance != 0
@@ -613,7 +613,7 @@ AND
tuple(self.filter_cost_center_ids.ids),
)
query_inject_account_params += (
- self.id or 'NULL',
+ self.id,
self.env.uid,
)
self.env.cr.execute(query_inject_account, query_inject_account_params)
@@ -934,7 +934,7 @@ WHERE
OR f.balance IS NOT NULL AND f.balance != 0
)
"""
- if self.hide_account_balance_at_0:
+ if self.hide_account_at_0:
query_inject_partner += """
AND
f.balance IS NOT NULL AND f.balance != 0
@@ -1559,224 +1559,208 @@ WHERE
}
self.env.cr.execute(query_update_analytic_tags, params)
- def _get_unaffected_earnings_account_sub_subquery_sum_initial(
- self
- ):
- """ Return subquery used to compute sum amounts on
- unaffected earnings accounts """
- sub_subquery_sum_amounts = """
+ def _inject_unaffected_earnings_account_values(self):
+ """Inject the report values of the unaffected earnings account
+ for report_general_ledger_qweb_account."""
+ # Fetch the profit and loss accounts
+ query_unaffected_earnings_account_ids = """
+ SELECT a.id
+ FROM account_account as a
+ INNER JOIN account_account_type as at
+ ON at.id = a.user_type_id
+ WHERE at.include_initial_balance = FALSE
+ """
+ self.env.cr.execute(query_unaffected_earnings_account_ids)
+ pl_account_ids = [r[0] for r in self.env.cr.fetchall()]
+ unaffected_earnings_account_ids = \
+ pl_account_ids + [self.unaffected_earnings_account.id]
+ # Fetch the current fiscal year start date
+ date = fields.Datetime.from_string(self.date_from)
+ res = self.company_id.compute_fiscalyear_dates(date)
+ fy_start_date = res['date_from']
+ query_select_previous_fy_unaffected_earnings_params = {
+ 'date_to': fy_start_date,
+ 'company_id': self.company_id.id,
+ 'account_ids': tuple(unaffected_earnings_account_ids),
+ 'analytic_tag_ids': tuple(self.filter_analytic_tag_ids.ids),
+ }
+ query_select_previous_fy_unaffected_earnings = ''
+ q_analytic_tags = ''
+ if self.filter_analytic_tag_ids:
+ q_analytic_tags = """
+WITH move_lines_on_tags AS
+ (
SELECT
- SUM(ml.balance) AS initial_balance,
- 0.0 AS final_balance
+ DISTINCT ml.id AS ml_id
FROM
account_account a
- INNER JOIN
- account_account_type at ON a.user_type_id = at.id
INNER JOIN
account_move_line ml
ON a.id = ml.account_id
- AND ml.date < %(date_from)s
- """
- if self.only_posted_moves:
- sub_subquery_sum_amounts += """
INNER JOIN
- account_move m ON ml.move_id = m.id AND m.state = 'posted'
- """
- if self.filter_cost_center_ids:
- sub_subquery_sum_amounts += """
+ account_analytic_tag_account_move_line_rel atml
+ ON atml.account_move_line_id = ml.id
INNER JOIN
- account_analytic_account aa
+ account_analytic_tag aat
ON
- ml.analytic_account_id = aa.id
- AND aa.id IN %(cost_center_ids)s
- """
- if self.filter_analytic_tag_ids:
- sub_subquery_sum_amounts += """
- INNER JOIN
- move_lines_on_tags ON ml.id = move_lines_on_tags.ml_id
- """
- sub_subquery_sum_amounts += """
+ atml.account_analytic_tag_id = aat.id
WHERE
- a.company_id = %(company_id)s
- AND
- a.id IN %(unaffected_earnings_account_ids)s
+ aat.id IN %(analytic_tag_ids)s
+ )
+"""
+ query_select_previous_fy_unaffected_earnings += q_analytic_tags
+
+ query_select_previous_fy_unaffected_earnings += """
+ SELECT sum(ml.balance) as balance
+ FROM account_move_line as ml
+ INNER JOIN account_move as am
+ ON am.id = ml.move_id
+ INNER JOIN account_journal j
+ ON am.journal_id = j.id
"""
- if self.filter_journal_ids:
- sub_subquery_sum_amounts += """
- AND
- ml.journal_id in %(filter_journal_ids)s """
- return sub_subquery_sum_amounts
-
- def _get_unaffected_earnings_account_sub_subquery_sum_final(self):
- """ Return subquery used to compute sum amounts on
- unaffected earnings accounts """
-
- sub_subquery_sum_amounts = """
- SELECT
- 0.0 AS initial_balance,
- SUM(ml.balance) AS final_balance
- """
- sub_subquery_sum_amounts += """
- FROM
- account_account a
- INNER JOIN
- account_account_type at ON a.user_type_id = at.id
- INNER JOIN
- account_move_line ml
- ON a.id = ml.account_id
- AND ml.date <= %(date_to)s
- """
- if self.only_posted_moves:
- sub_subquery_sum_amounts += """
- INNER JOIN
- account_move m ON ml.move_id = m.id AND m.state = 'posted'
- """
if self.filter_cost_center_ids:
- sub_subquery_sum_amounts += """
- INNER JOIN
- account_analytic_account aa
- ON
- ml.analytic_account_id = aa.id
- AND aa.id IN %(cost_center_ids)s
- """
- if self.filter_analytic_tag_ids:
- sub_subquery_sum_amounts += """
- INNER JOIN
- move_lines_on_tags ON ml.id = move_lines_on_tags.ml_id
+ query_select_previous_fy_unaffected_earnings += """
+ INNER JOIN account_analytic_account aa
+ ON aml.analytic_account_id = aa.id
+ AND aa.id IN %(cost_center_ids)s
"""
- sub_subquery_sum_amounts += """
- WHERE
- a.company_id = %(company_id)s
- AND
- a.id IN %(unaffected_earnings_account_ids)s
+ query_select_previous_fy_unaffected_earnings_params[
+ 'cost_center_ids'] = tuple(self.filter_cost_center_ids.ids)
+ if self.filter_analytic_tag_ids:
+ query_select_previous_fy_unaffected_earnings += """
+ INNER JOIN move_lines_on_tags ON ml.id =
+ move_lines_on_tags.ml_id
+ """
+ query_select_previous_fy_unaffected_earnings += """
+ WHERE ml.date < %(date_to)s
+ AND ml.company_id = %(company_id)s
+ AND ml.account_id IN %(account_ids)s
"""
if self.filter_journal_ids:
- sub_subquery_sum_amounts += """
- AND
- ml.journal_id in %(filter_journal_ids)s
- """
- return sub_subquery_sum_amounts
-
- def _inject_unaffected_earnings_account_values(self):
- """Inject the report values of the unaffected earnings account
- for report_general_ledger_qweb_account."""
- subquery_sum_amounts = """
+ query_select_previous_fy_unaffected_earnings += """
+ AND j.id IN %(journal_ids)s
+ """
+ query_select_previous_fy_unaffected_earnings_params[
+ 'journal_ids'] = tuple(self.filter_journal_ids.ids)
+ if self.only_posted_moves:
+ query_select_previous_fy_unaffected_earnings += """
+ AND am.state = 'posted'
+ """
+ self.env.cr.execute(
+ query_select_previous_fy_unaffected_earnings,
+ query_select_previous_fy_unaffected_earnings_params)
+ res = self.env.cr.fetchone()
+ unaffected_earnings_initial_balance = res[0] or 0.0
+ # Now select the current period unaffected earnings,
+ # excluding the current period P&L.
+ query_select_period_unaffected_earnings_params = {
+ 'date_from': self.date_from,
+ 'date_to': self.date_to,
+ 'company_id': self.company_id.id,
+ 'unaffected_earnings_id': self.unaffected_earnings_account.id,
+ 'analytic_tag_ids': tuple(self.filter_analytic_tag_ids.ids),
+ }
+ query_select_period_unaffected_earnings = ''
+ if self.filter_analytic_tag_ids:
+ query_select_period_unaffected_earnings += q_analytic_tags
+ query_select_period_unaffected_earnings += """
SELECT
- SUM(COALESCE(sub.initial_balance, 0.0)) AS initial_balance,
- SUM(COALESCE(sub.final_balance, 0.0)) AS final_balance
- FROM
- (
+ sum(ml.debit) as sum_debit,
+ sum(ml.credit) as sum_credit,
+ sum(ml.balance) as balance
+ FROM account_move_line as ml
+ INNER JOIN account_move as am
+ ON am.id = ml.move_id
+ INNER JOIN account_journal j
+ ON am.journal_id = j.id
"""
- # Initial balances
- subquery_sum_amounts += \
- self._get_unaffected_earnings_account_sub_subquery_sum_initial()
- subquery_sum_amounts += """
- UNION
- """
- subquery_sum_amounts += \
- self._get_unaffected_earnings_account_sub_subquery_sum_final()
- subquery_sum_amounts += """
- ) sub
+ if self.filter_cost_center_ids:
+ query_select_period_unaffected_earnings += """
+ INNER JOIN account_analytic_account aa
+ ON aml.analytic_account_id = aa.id
+ AND aa.id IN %(cost_center_ids)s
+ """
+ query_select_period_unaffected_earnings_params[
+ 'cost_center_ids'] = tuple(self.filter_cost_center_ids.ids)
+ if self.filter_analytic_tag_ids:
+ query_select_period_unaffected_earnings += """
+ INNER JOIN move_lines_on_tags
+ ON ml.id = move_lines_on_tags.ml_id
+ """
+ query_select_period_unaffected_earnings += """
+ WHERE am.date >= %(date_from)s
+ AND ml.date <= %(date_to)s
+ AND ml.company_id = %(company_id)s
+ AND ml.account_id = %(unaffected_earnings_id)s
"""
+ if self.filter_journal_ids:
+ query_select_period_unaffected_earnings += """
+ AND j.id IN %(journal_ids)s
+ """
+ query_select_period_unaffected_earnings_params[
+ 'journal_ids'] = tuple(self.filter_journal_ids.ids)
+ if self.only_posted_moves:
+ query_select_period_unaffected_earnings += """
+ AND am.state = 'posted'
+ """
+ self.env.cr.execute(query_select_period_unaffected_earnings,
+ query_select_period_unaffected_earnings_params)
+ res = self.env.cr.fetchone()
+ unaffected_earnings_period_debit = res[0] or 0.0
+ unaffected_earnings_period_credit = res[1] or 0.0
+ unaffected_earnings_period_balance = res[2] or 0.0
# pylint: disable=sql-injection
query_inject_account = """
- WITH
- """
-
- if self.filter_analytic_tag_ids:
- query_inject_account += """
- move_lines_on_tags AS
- (
- SELECT
- DISTINCT ml.id AS ml_id
- FROM
- account_account a
- INNER JOIN
- account_move_line ml
- ON a.id = ml.account_id
- INNER JOIN
- account_analytic_tag_account_move_line_rel atml
- ON atml.account_move_line_id = ml.id
- INNER JOIN
- account_analytic_tag aat
- ON
- atml.account_analytic_tag_id = aat.id
- WHERE
- aat.id IN %(analytic_tag_ids)s
- ),
- """
-
- query_inject_account += """
- sum_amounts AS ( """ + subquery_sum_amounts + """ )
- INSERT INTO
- report_general_ledger_qweb_account
- (
- report_id,
- create_uid,
- create_date,
- account_id,
- code,
- name,
- is_partner_account,
- initial_balance,
- final_balance,
- currency_id
+ INSERT INTO
+ report_general_ledger_qweb_account (
+ report_id,
+ create_uid,
+ create_date,
+ account_id,
+ code,
+ name,
+ is_partner_account,
+ initial_debit,
+ initial_credit,
+ initial_balance,
+ final_debit,
+ final_credit,
+ final_balance
+ )
+ VALUES (
+ %(report_id)s,
+ %(user_id)s,
+ NOW(),
+ %(account_id)s,
+ %(code)s,
+ %(name)s,
+ False,
+ %(initial_debit)s,
+ %(initial_credit)s,
+ %(initial_balance)s,
+ %(final_debit)s,
+ %(final_credit)s,
+ %(final_balance)s
)
- SELECT
- %(report_id)s AS report_id,
- %(user_id)s AS create_uid,
- NOW() AS create_date,
- a.id AS account_id,
- a.code,
- a.name,
- False AS is_partner_account,
- COALESCE(i.initial_balance, 0.0) AS initial_balance,
- COALESCE(i.final_balance, 0.0) AS final_balance,
- c.id as currency_id
- FROM
- account_account a
- LEFT JOIN
- res_currency c ON c.id = a.currency_id,
- sum_amounts i
- WHERE
- a.company_id = %(company_id)s
- AND a.id = %(unaffected_earnings_account_id)s
- """
- query_inject_account_params = {}
- if self.filter_analytic_tag_ids:
- query_inject_account_params['analytic_tag_ids'] = \
- tuple(self.filter_analytic_tag_ids.ids)
- query_inject_account_params.update({
- 'date_from': self.date_from,
- 'date_to': self.date_to,
- 'fy_start_date': self.fy_start_date,
- })
- if self.filter_cost_center_ids:
- query_inject_account_params['cost_center_ids'] = \
- tuple(self.filter_cost_center_ids.ids)
-
- query_inject_account_params['company_id'] = self.company_id.id
- query_inject_account_params['unaffected_earnings_account_id'] = \
- self.unaffected_earnings_account.id
- query_inject_account_params['report_id'] = self.id
- query_inject_account_params['user_id'] = self.env.uid
-
- if self.filter_journal_ids:
- query_inject_account_params['filter_journal_ids'] = (tuple(
- self.filter_journal_ids.ids,
- ),)
- # Fetch the profit and loss accounts
- query_unaffected_earnings_account_ids = """
- SELECT a.id
- FROM account_account as a
- INNER JOIN account_account_type as at
- ON at.id = a.user_type_id
- WHERE at.include_initial_balance = FALSE
"""
- self.env.cr.execute(query_unaffected_earnings_account_ids)
- pl_account_ids = [r[0] for r in self.env.cr.fetchall()]
- query_inject_account_params['unaffected_earnings_account_ids'] = \
- tuple(pl_account_ids + [self.unaffected_earnings_account.id])
-
+ initial_debit = unaffected_earnings_initial_balance >= 0 and \
+ unaffected_earnings_initial_balance or 0
+ initial_credit = unaffected_earnings_initial_balance < 0 and \
+ -1 * unaffected_earnings_initial_balance or 0
+ final_balance = unaffected_earnings_initial_balance + \
+ unaffected_earnings_period_balance
+ query_inject_account_params = {
+ 'report_id': self.id,
+ 'user_id': self.env.uid,
+ 'account_id': self.unaffected_earnings_account.id,
+ 'code': self.unaffected_earnings_account.code,
+ 'name': self.unaffected_earnings_account.name,
+ 'initial_debit': initial_debit,
+ 'initial_credit': initial_credit,
+ 'initial_balance': unaffected_earnings_initial_balance,
+ 'final_debit': initial_debit + unaffected_earnings_period_debit,
+ 'final_credit': initial_credit + unaffected_earnings_period_credit,
+ 'final_balance': final_balance,
+ }
self.env.cr.execute(query_inject_account,
query_inject_account_params)
diff --git a/account_financial_report_qweb/report/general_ledger_xlsx.py b/account_financial_report_qweb/report/general_ledger_xlsx.py
index 314c88c3..e6936e52 100644
--- a/account_financial_report_qweb/report/general_ledger_xlsx.py
+++ b/account_financial_report_qweb/report/general_ledger_xlsx.py
@@ -89,7 +89,7 @@ class GeneralLedgerXslx(abstract_report_xlsx.AbstractReportXslx):
],
[
_('Account balance at 0 filter'),
- _('Hide') if report.hide_account_balance_at_0 else _('Show'),
+ _('Hide') if report.hide_account_at_0 else _('Show'),
],
[
_('Centralize filter'),
diff --git a/account_financial_report_qweb/report/open_items.py b/account_financial_report_qweb/report/open_items.py
index 17f42cab..7d1c879a 100644
--- a/account_financial_report_qweb/report/open_items.py
+++ b/account_financial_report_qweb/report/open_items.py
@@ -22,7 +22,7 @@ class OpenItemsReport(models.TransientModel):
# Filters fields, used for data computation
date_at = fields.Date()
only_posted_moves = fields.Boolean()
- hide_account_balance_at_0 = fields.Boolean()
+ hide_account_at_0 = fields.Boolean()
foreign_currency = fields.Boolean()
company_id = fields.Many2one(comodel_name='res.company')
filter_account_ids = fields.Many2many(comodel_name='account.account')
@@ -188,7 +188,7 @@ class OpenItemsReportCompute(models.TransientModel):
self._inject_line_values(only_empty_partner_line=True)
self._clean_partners_and_accounts()
self._compute_partners_and_accounts_cumul()
- if self.hide_account_balance_at_0:
+ if self.hide_account_at_0:
self._clean_partners_and_accounts(
only_delete_account_balance_at_0=True
)
diff --git a/account_financial_report_qweb/report/open_items_xlsx.py b/account_financial_report_qweb/report/open_items_xlsx.py
index 9f6c645d..6a4e1a3e 100644
--- a/account_financial_report_qweb/report/open_items_xlsx.py
+++ b/account_financial_report_qweb/report/open_items_xlsx.py
@@ -63,7 +63,7 @@ class OpenItemsXslx(abstract_report_xlsx.AbstractReportXslx):
_('All posted entries') if report.only_posted_moves else _(
'All entries')],
[_('Account balance at 0 filter'),
- _('Hide') if report.hide_account_balance_at_0 else _('Show')],
+ _('Hide') if report.hide_account_at_0 else _('Show')],
[_('Show foreign currency'),
_('Yes') if report.foreign_currency else _('No')],
]
diff --git a/account_financial_report_qweb/report/templates/general_ledger.xml b/account_financial_report_qweb/report/templates/general_ledger.xml
index 0e097cba..3d9ebb44 100644
--- a/account_financial_report_qweb/report/templates/general_ledger.xml
+++ b/account_financial_report_qweb/report/templates/general_ledger.xml
@@ -93,8 +93,8 @@