Hello,
I want to add a filter to the field invoice_lines on the invoice -view. Because the invoices are way to long so I only want to show the sections.
I tried to add a domain directly to the field in the view xml. This doesn't work, the field still shows all the lines.
I tried to add an extra field: filtered_invoice_lines using the same ID as the invoice lines. I added a domain to this field.
This works perfect, the field only shows the records I want to. But now there is a problem when I try to create a new invoice. Odoo gives an error, because for some reason this new-field makes it so the bookings are not valid anymore...
Therefor my question: What is the correct way to add a domain filter to a one2many field, so only the wanted records are shown in a view.
Thank you for your help!