Browse Source

[account_financial_report_qweb] fix title formatting for all reports

pull/505/head
Jordi Ballester Alomar 6 years ago
parent
commit
1fcc65adfb
  1. 2
      account_financial_report_qweb/__manifest__.py
  2. 7
      account_financial_report_qweb/report/abstract_report_xlsx.py
  3. 4
      account_financial_report_qweb/report/aged_partner_balance_xlsx.py
  4. 4
      account_financial_report_qweb/report/general_ledger_xlsx.py
  5. 4
      account_financial_report_qweb/report/journal_report_xlsx.py
  6. 4
      account_financial_report_qweb/report/open_items_xlsx.py
  7. 4
      account_financial_report_qweb/report/trial_balance_xlsx.py

2
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.3.0.0',
'version': '10.0.3.0.1',
'category': 'Reporting',
'summary': 'OCA Financial Reports',
'author': 'Camptocamp SA,'

7
account_financial_report_qweb/report/abstract_report_xlsx.py

@ -360,6 +360,13 @@ class AbstractReportXslx(ReportXlsx):
def _generate_report_content(self, workbook, report):
pass
def _get_report_complete_name(self, report, prefix):
if report.company_id:
suffix = ' - %s - %s' % (
report.company_id.name, report.company_id.currency_id.name)
return prefix + suffix
return prefix
def _get_report_name(self, objects):
"""
Allow to define the report name.

4
account_financial_report_qweb/report/aged_partner_balance_xlsx.py

@ -16,8 +16,8 @@ class AgedPartnerBalanceXslx(abstract_report_xlsx.AbstractReportXslx):
name, table, rml, parser, header, store)
def _get_report_name(self, report):
return _('Aged Partner Balance - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('Aged Partner Balance')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report):
if not report.show_move_line_details:

4
account_financial_report_qweb/report/general_ledger_xlsx.py

@ -17,8 +17,8 @@ class GeneralLedgerXslx(abstract_report_xlsx.AbstractReportXslx):
name, table, rml, parser, header, store)
def _get_report_name(self, report):
return _('General Ledger - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('General Ledger')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report):
res = {

4
account_financial_report_qweb/report/journal_report_xlsx.py

@ -18,8 +18,8 @@ class JournalXslx(abstract_report_xlsx.AbstractReportXslx):
name, table, rml, parser, header, store)
def _get_report_name(self, report):
return _('Journal Ledger - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('Journal Ledger')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report):
columns = [

4
account_financial_report_qweb/report/open_items_xlsx.py

@ -16,8 +16,8 @@ class OpenItemsXslx(abstract_report_xlsx.AbstractReportXslx):
name, table, rml, parser, header, store)
def _get_report_name(self, report):
return _('Open Items - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('Open Items')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report):
res = {

4
account_financial_report_qweb/report/trial_balance_xlsx.py

@ -16,8 +16,8 @@ class TrialBalanceXslx(abstract_report_xlsx.AbstractReportXslx):
name, table, rml, parser, header, store)
def _get_report_name(self, report):
return _('Trial Balance - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('Trial Balance')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report):
if not report.show_partner_details:

Loading…
Cancel
Save