[account_financial_report][IMP] Adds the following:

All reports:
- Rename field to hide accounts at 0 to 'hide_account_at_0'
Trial Balance:
- Add possibility to filter by hierarchy levels
- XLSX format will show the hierarchy levels in bold

General Ledger:
- Add the possibility to filter by analytic tags
- Fixes an error on the default date
Journal Ledger:
- The filter on Journals is now optional. If the user does not choose
a journal, by default it will display all journals.

Aged Partner Balance:
- Fixes an error on the default date
This commit is contained in:
Jordi Ballester Alomar
2018-11-22 12:52:27 +01:00
committed by chaule97
parent 1aa03c7bb7
commit 99fb232194
22 changed files with 597 additions and 124 deletions

View File

@@ -38,7 +38,7 @@ class JournalLedgerReportWizard(models.TransientModel):
comodel_name='account.journal',
string="Journals",
domain="[('company_id', '=', company_id)]",
required=True,
required=False,
)
move_target = fields.Selection(
selection='_get_move_targets',
@@ -121,13 +121,18 @@ class JournalLedgerReportWizard(models.TransientModel):
@api.multi
def _prepare_report_journal_ledger(self):
self.ensure_one()
journals = self.journal_ids
if not journals:
# Not selecting a journal means that we'll display all journals
journals = self.env['account.journal'].search(
[('company_id', '=', self.company_id.id)])
return {
'date_from': self.date_from,
'date_to': self.date_to,
'move_target': self.move_target,
'foreign_currency': self.foreign_currency,
'company_id': self.company_id.id,
'journal_ids': [(6, 0, self.journal_ids.ids)],
'journal_ids': [(6, 0, journals.ids)],
'sort_option': self.sort_option,
'group_option': self.group_option,
'with_account_name': self.with_account_name,