Browse Source

[ADD] 11.0 account_financial_report: journals filter for trial balance

pull/444/head
mpanarin 7 years ago
parent
commit
429b7a3707
  1. 2
      account_financial_report/report/trial_balance.py
  2. 4
      account_financial_report/wizard/trial_balance_wizard.py
  3. 2
      account_financial_report/wizard/trial_balance_wizard_view.xml

2
account_financial_report/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()
hierarchy_on = fields.Selection([('computed', 'Computed Accounts'),
('relation', 'Child Accounts')],
@ -187,6 +188,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/wizard/trial_balance_wizard.py

@ -54,6 +54,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,
@ -157,6 +160,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,
'hierarchy_on': self.hierarchy_on,
'show_partner_details': self.show_partner_details,

2
account_financial_report/wizard/trial_balance_wizard_view.xml

@ -28,6 +28,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