diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-06-06 17:10:39 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-06-06 17:25:55 +0200 |
| commit | fc8d96d2cb1fb2f8debaf53e5f6d29ab3489cf6e (patch) | |
| tree | b4a6776d080081f622247f960bf7941853dfdb87 | |
| parent | 19dcd7c3eca460359fe8968e68b466d6f23b64be (diff) | |
[FIX] account: Invoices & Refunds filters together
When both selected, these filters are expected
to display Invoices - OR - Refunds.
It was not the case, because the web client
expects to receive the domains normalized
when concatenating domains together with a
`|` statement.
Selecting both filters resulted in the below domain:
```
[
'|',
('state','in',['open','paid']),
('type','in',('out_invoice','in_invoice'))`,
('state','in',['open','paid']),
('type','in',('out_refund','in_refund')),
]
```
Instead of
```
[
'|',
'&', ('state','in',['open','paid']), ('type','in',('out_invoice','in_invoice'))`,
'&', ('state','in',['open','paid']), ('type','in',('out_refund','in_refund')),
]
```
opw-679246
| -rw-r--r-- | addons/account/views/account_invoice_view.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index 732fa72388b..cf5a9584c2f 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -507,11 +507,11 @@ <field name="journal_id" /> <filter name="draft" string="Draft" domain="[('state','in',('draft', 'proforma'))]"/> <filter name="proforma" string="Proforma" domain="[('state','=','proforma2')]" groups="account.group_proforma_invoices"/> - <filter name="invoices" string="Invoices" domain="[('state','in',['open','paid']),('type','in',('out_invoice','in_invoice'))]"/> - <filter name="refunds" string="Refunds" domain="[('state','in',['open','paid']),('type','in',('out_refund','in_refund'))]"/> + <filter name="invoices" string="Invoices" domain="['&', ('state','in',['open','paid']),('type','in',('out_invoice','in_invoice'))]"/> + <filter name="refunds" string="Refunds" domain="['&', ('state','in',['open','paid']),('type','in',('out_refund','in_refund'))]"/> <separator/> <filter name="unpaid" string="Not Paid" domain="[('state','=','open')]"/> - <filter name="late" string="Overdue" domain="[('date_due', '<', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/> + <filter name="late" string="Overdue" domain="['&', ('date_due', '<', time.strftime('%%Y-%%m-%%d')), ('state', '=', 'open')]" help="Overdue invoices, maturity date passed"/> <separator/> <field name="partner_id" operator="child_of"/> <field name="user_id" string="Salesperson"/> |
