|
@ -31,6 +31,7 @@ class OpenItemsReportWizard(models.TransientModel): |
|
|
comodel_name='account.account', |
|
|
comodel_name='account.account', |
|
|
string='Filter accounts', |
|
|
string='Filter accounts', |
|
|
domain=[('reconcile', '=', True)], |
|
|
domain=[('reconcile', '=', True)], |
|
|
|
|
|
required=True, |
|
|
) |
|
|
) |
|
|
hide_account_at_0 = fields.Boolean( |
|
|
hide_account_at_0 = fields.Boolean( |
|
|
string='Hide account ending balance at 0', default=True, |
|
|
string='Hide account ending balance at 0', default=True, |
|
@ -84,6 +85,10 @@ class OpenItemsReportWizard(models.TransientModel): |
|
|
res['domain']['partner_ids'] += self._get_partner_ids_domain() |
|
|
res['domain']['partner_ids'] += self._get_partner_ids_domain() |
|
|
return res |
|
|
return res |
|
|
|
|
|
|
|
|
|
|
|
@api.onchange('account_ids') |
|
|
|
|
|
def onchange_account_ids(self): |
|
|
|
|
|
return {'domain': {'account_ids': [('reconcile', '=', True)]}} |
|
|
|
|
|
|
|
|
@api.onchange('receivable_accounts_only', 'payable_accounts_only') |
|
|
@api.onchange('receivable_accounts_only', 'payable_accounts_only') |
|
|
def onchange_type_accounts_only(self): |
|
|
def onchange_type_accounts_only(self): |
|
|
"""Handle receivable/payable accounts only change.""" |
|
|
"""Handle receivable/payable accounts only change.""" |
|
@ -95,9 +100,9 @@ class OpenItemsReportWizard(models.TransientModel): |
|
|
domain += [('internal_type', '=', 'receivable')] |
|
|
domain += [('internal_type', '=', 'receivable')] |
|
|
elif self.payable_accounts_only: |
|
|
elif self.payable_accounts_only: |
|
|
domain += [('internal_type', '=', 'payable')] |
|
|
domain += [('internal_type', '=', 'payable')] |
|
|
elif not self.receivable_accounts_only and not self.payable_accounts_only: |
|
|
|
|
|
domain += [('reconcile', '=', True)] |
|
|
|
|
|
self.account_ids = self.env['account.account'].search(domain) |
|
|
self.account_ids = self.env['account.account'].search(domain) |
|
|
|
|
|
else: |
|
|
|
|
|
self.account_ids = None |
|
|
|
|
|
|
|
|
@api.multi |
|
|
@api.multi |
|
|
def _print_report(self, report_type): |
|
|
def _print_report(self, report_type): |
|
|