I am struggling with creating AND condition on account.invoice model for o2m invoice_line_ids field (relation to account.invoice.line model). I need to filter invoices having invoice line with Product=Downpayment and quantity=1 at the same time. With using domain filter in XML search view (see code below) it does not work because it takes in account all lines in order to satisfy the defined condition within one invoice. Using Odoo v12.0.
<xpath expr="//search/filter[@name='myinvoices']" position="before">
<filter name="Downpayments" domain="[('invoice_line_ids.product_id.name', '=', 'Downpayment'), ('invoice_line_ids.quantity', '=', 1)]"/>
Many thanks for your help