Browse Source
Merge pull request #504 from Eficent/11.0-imp-account_financial_report-multicompany-2
[11.0][account_financial_report] fix title formatting for all reports
pull/514/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
20 additions and
13 deletions
-
account_financial_report/__manifest__.py
-
account_financial_report/report/abstract_report_xlsx.py
-
account_financial_report/report/aged_partner_balance_xlsx.py
-
account_financial_report/report/general_ledger_xlsx.py
-
account_financial_report/report/journal_ledger_xlsx.py
-
account_financial_report/report/open_items_xlsx.py
-
account_financial_report/report/trial_balance_xlsx.py
-
account_financial_report/report/vat_report_xlsx.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,' |
|
|
|
@ -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. |
|
|
|
@ -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: |
|
|
|
@ -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 = { |
|
|
|
@ -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 = [ |
|
|
|
@ -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 = { |
|
|
|
@ -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: |
|
|
|
@ -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 { |
|
|