[account_financial_report]

- minor usability fixes for multicompany
- improve performance of general ledger using a new index
This commit is contained in:
Jordi Ballester Alomar
2019-01-09 19:03:27 +01:00
committed by chaule97
parent 2abb852345
commit 49ca90f15c
25 changed files with 2072 additions and 1970 deletions

View File

@@ -41,7 +41,7 @@ class AbstractReportXslx(models.AbstractModel):
self._define_formats(workbook)
report_name = self._get_report_name(objects)
report_name = self._get_report_name(report)
report_footer = self._get_report_footer()
filters = self._get_report_filters(report)
self.columns = self._get_report_columns(report)
@@ -349,7 +349,7 @@ class AbstractReportXslx(models.AbstractModel):
"""
raise NotImplementedError()
def _get_report_name(self, objects):
def _get_report_name(self, report):
"""
Allow to define the report name.
Report name will be used as sheet name and as report title.

View File

@@ -10,8 +10,7 @@ class AgedPartnerBalanceXslx(models.AbstractModel):
_name = 'report.a_f_r.report_aged_partner_balance_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('Aged Partner Balance - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)

View File

@@ -11,8 +11,7 @@ class GeneralLedgerXslx(models.AbstractModel):
_name = 'report.a_f_r.report_general_ledger_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('General Ledger - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)

View File

@@ -10,8 +10,7 @@ class JournalLedgerXslx(models.AbstractModel):
_name = 'report.a_f_r.report_journal_ledger_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('Journal Ledger - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)

View File

@@ -9,8 +9,7 @@ class OpenItemsXslx(models.AbstractModel):
_name = 'report.a_f_r.report_open_items_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('Open Items - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)

View File

@@ -10,8 +10,7 @@ class TrialBalanceXslx(models.AbstractModel):
_name = 'report.a_f_r.report_trial_balance_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('Trial Balance - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)

View File

@@ -8,8 +8,7 @@ class VATReportXslx(models.AbstractModel):
_name = 'report.a_f_r.report_vat_report_xlsx'
_inherit = 'report.account_financial_report.abstract_report_xlsx'
def _get_report_name(self, objects):
report = objects
def _get_report_name(self, report):
return _('VAT Report - %s - %s') % (
report.company_id.name, report.company_id.currency_id.name)