Browse Source

[ADD] 10.0 account_financial_report_qweb: add journal filter

on Trial Balance
pull/445/head
mpanarin 7 years ago
parent
commit
b803646c8a
  1. 2
      account_financial_report_qweb/report/trial_balance.py
  2. 4
      account_financial_report_qweb/wizard/trial_balance_wizard.py
  3. 2
      account_financial_report_qweb/wizard/trial_balance_wizard_view.xml

2
account_financial_report_qweb/report/trial_balance.py

@ -28,6 +28,7 @@ class TrialBalanceReport(models.TransientModel):
company_id = fields.Many2one(comodel_name='res.company')
filter_account_ids = fields.Many2many(comodel_name='account.account')
filter_partner_ids = fields.Many2many(comodel_name='res.partner')
filter_journal_ids = fields.Many2many(comodel_name='account.journal')
show_partner_details = fields.Boolean()
# General Ledger Report Data fields,
@ -170,6 +171,7 @@ class TrialBalanceReportCompute(models.TransientModel):
'company_id': self.company_id.id,
'filter_account_ids': [(6, 0, account_ids.ids)],
'filter_partner_ids': [(6, 0, self.filter_partner_ids.ids)],
'filter_journal_ids': [(6, 0, self.filter_journal_ids.ids)],
'fy_start_date': self.fy_start_date,
}

4
account_financial_report_qweb/wizard/trial_balance_wizard.py

@ -49,6 +49,9 @@ class TrialBalanceReportWizard(models.TransientModel):
comodel_name='res.partner',
string='Filter partners',
)
journal_ids = fields.Many2many(
comodel_name="account.journal",
)
not_only_one_unaffected_earnings_account = fields.Boolean(
readonly=True,
@ -151,6 +154,7 @@ class TrialBalanceReportWizard(models.TransientModel):
'company_id': self.company_id.id,
'filter_account_ids': [(6, 0, self.account_ids.ids)],
'filter_partner_ids': [(6, 0, self.partner_ids.ids)],
'filter_journal_ids': [(6, 0, self.partner_ids.ids)],
'fy_start_date': self.fy_start_date,
'show_partner_details': self.show_partner_details,
}

2
account_financial_report_qweb/wizard/trial_balance_wizard_view.xml

@ -27,6 +27,8 @@
</group>
<label for="partner_ids" attrs="{'invisible':[('show_partner_details','!=',True)]}"/>
<field name="partner_ids" nolabel="1" options="{'no_create': True}" attrs="{'invisible':[('show_partner_details','!=',True)]}"/>
<label for="journal_ids"/>
<field name="journal_ids" widget="many2many_tags" nolabel="1" options="{'no_create': True}"/>
<group attrs="{'invisible':[('show_partner_details','!=',True)]}"/>
<label for="account_ids"/>
<group col="4">

Loading…
Cancel
Save