diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2019-02-25 09:46:42 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2019-02-25 09:46:42 +0000 |
| commit | 397f2e6c50640ed74bdd5174824768bcda0d9581 (patch) | |
| tree | 411379eae4bfb13c3c4aa77a0d72816248c40694 | |
| parent | 74bd66e1b5e04be8ae58305b6c0c0b1723ef511d (diff) | |
[FIX] account: Use the correct journal on accounting dashboard
- When selecting "Unpaid invoices" or "Invoices to validate" on the
accounting dashboard, the list view opened doesn't filter with the
journal selected.
closes odoo/odoo#31397
| -rw-r--r-- | addons/account/models/account_journal_dashboard.py | 5 | ||||
| -rw-r--r-- | addons/account/views/account_invoice_view.xml | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 975659cc377..eeaca15fae8 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -367,12 +367,11 @@ class account_journal(models.Model): 'journal_type': self.type, 'default_journal_id': self.id, 'default_type': invoice_type, - 'type': invoice_type + 'type': invoice_type, + 'search_default_journal_id': self.id, }) [action] = self.env.ref('account.%s' % action_name).read() - if not self.env.context.get('use_domain'): - ctx['search_default_journal_id'] = self.id action['context'] = ctx action['domain'] = self._context.get('use_domain', []) account_invoice_filter = self.env.ref('account.view_account_invoice_filter', False) diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index 5df72699ccd..cb6c3ea93da 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -643,6 +643,7 @@ <search string="Search Invoice"> <field name="number" string="Invoice" filter_domain="['|','|','|', ('number','ilike',self), ('origin','ilike',self), ('reference', 'ilike', self), ('partner_id', 'child_of', self)]"/> <filter domain="[('user_id','=',uid)]" name="myinvoices" help="My Invoices"/> + <field name="journal_id"/> <separator/> <filter name="draft" string="Draft" domain="[('state','=','draft')]"/> <filter name="unpaid" string="Open" domain="[('state', '=', 'open')]"/> |
