I want to add product filter in account invoice model. How to do it?Any help appreciated. Is it can be done by using related field?
Just add new "field" filter in the search view:
<field name="invoice_line" string="Product"
filter_domain="[('invoice_line.product_id', 'ilike', self)]" />
For newer Odoo Versions (field name changed):
<field name="invoice_line_ids" string="Product"
filter_domain="[('invoice_line_ids.product_id', 'ilike', self)]" />