Browse Source

[account_financial_report] fix title formatting for all reports

pull/663/head
Jordi Ballester Alomar 6 years ago
committed by Ernesto Tejeda
parent
commit
1b1ace6d81
  1. 2
      account_financial_report/__manifest__.py
  2. 7
      account_financial_report/report/abstract_report_xlsx.py
  3. 4
      account_financial_report/report/aged_partner_balance_xlsx.py
  4. 4
      account_financial_report/report/general_ledger_xlsx.py
  5. 4
      account_financial_report/report/journal_ledger_xlsx.py
  6. 4
      account_financial_report/report/open_items_xlsx.py
  7. 4
      account_financial_report/report/trial_balance_xlsx.py
  8. 4
      account_financial_report/report/vat_report_xlsx.py

2
account_financial_report/__manifest__.py

@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
'name': 'Account Financial Reports', 'name': 'Account Financial Reports',
'version': '11.0.2.4.1',
'version': '11.0.2.4.2',
'category': 'Reporting', 'category': 'Reporting',
'summary': 'OCA Financial Reports', 'summary': 'OCA Financial Reports',
'author': 'Camptocamp SA,' 'author': 'Camptocamp SA,'

7
account_financial_report/report/abstract_report_xlsx.py

@ -349,6 +349,13 @@ class AbstractReportXslx(models.AbstractModel):
""" """
raise NotImplementedError() raise NotImplementedError()
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, report): def _get_report_name(self, report):
""" """
Allow to define the report name. Allow to define the report name.

4
account_financial_report/report/aged_partner_balance_xlsx.py

@ -11,8 +11,8 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): 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): def _get_report_columns(self, report):
if not report.show_move_line_details: if not report.show_move_line_details:

4
account_financial_report/report/general_ledger_xlsx.py

@ -12,8 +12,8 @@ class GeneralLedgerXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): 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): def _get_report_columns(self, report):
res = { res = {

4
account_financial_report/report/journal_ledger_xlsx.py

@ -11,8 +11,8 @@ class JournalLedgerXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): 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): def _get_report_columns(self, report):
columns = [ columns = [

4
account_financial_report/report/open_items_xlsx.py

@ -10,8 +10,8 @@ class OpenItemsXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): 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): def _get_report_columns(self, report):
res = { res = {

4
account_financial_report/report/trial_balance_xlsx.py

@ -11,8 +11,8 @@ class TrialBalanceXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): 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): def _get_report_columns(self, report):
if not report.show_partner_details: if not report.show_partner_details:

4
account_financial_report/report/vat_report_xlsx.py

@ -9,8 +9,8 @@ class VATReportXslx(models.AbstractModel):
_inherit = 'report.account_financial_report.abstract_report_xlsx' _inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, report): def _get_report_name(self, report):
return _('VAT Report - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)
report_name = _('VAT Report')
return self._get_report_complete_name(report, report_name)
def _get_report_columns(self, report): def _get_report_columns(self, report):
return { return {

Loading…
Cancel
Save