Create a new invoice type for Odoo “Facturas especiales”, they share the “in_invoice” type, but “Facturas especiales” have a boolean field that differentiates them from normal vendor invoices. The filter to not show normal vendor invoices in the “Facturas especiales” view works, but the filter to NOT show “Facturas especiales” in the vendor invoices view does not work.
Filter that works
<record id="account_move_special_invoice_menu" model="ir.actions.act_window">
<field name="name">Facturas especiales</field>
<field name="res_model">account.move</field>
<field name="view_mode">tree,form</field>
<field name="domain">[("factura_especial", "=", True)]</field>
<field name="context">{"default_move_type": "in_invoice", "default_factura_especial": True}</field>
</record>
Filter does not work
<record id="account_move_supplier_invoice_action" model="ir.actions.act_window">
<field name="name">Facturas de proveedor</field>
<field name="res_model">account.move</field>
<field name="view_mode">tree,form</field>
<field name="domain">[("move_type", "=", "in_invoice"), ("factura_especial", "=", False)]</field>
</record>
I can’t think of any other way to try to filter the records and would like to know why the filter is not working and the “Facturas especiales” are still displayed in the vendor invoice view.
damar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.