Before this commit the only way to modify the domain is to completely override portal_my_invoices. Since this function is so big this is not clean/easy to do. By creating a separate function we can simply override it and we can reuse the function on two places. closes odoo/odoo#77446 X-original-commit: b7effc442cd7ff47e00718adf5b1af43e9f326ee Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>