From e09cb7a27d3362c05e738296b6b3cc55edab9ffb Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Thu, 22 Apr 2021 13:30:23 +0000 Subject: [PATCH] [FIX] account: display credit notes on portal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Create an invoice for a portal user - Add a credit note for that invoice - Connect with portal user - On Invoices & Bills menu, the correct count is displayed (i.e. 2) - Open Invoices & Bills page The "All" filter only displays out_invoice and in_invoice, making impossible to view the other types (out_refund, in_refund, out_receipt, in_receipt). opw-2486471 closes odoo/odoo#69792 X-original-commit: 159bc7b0c081fd54df2f2396b18e9a63892caa2e Signed-off-by: William André (wan) --- addons/account/controllers/portal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/controllers/portal.py b/addons/account/controllers/portal.py index 6d2aeb3fa58..a0c9bf163cc 100644 --- a/addons/account/controllers/portal.py +++ b/addons/account/controllers/portal.py @@ -49,9 +49,9 @@ class PortalAccount(CustomerPortal): order = searchbar_sortings[sortby]['order'] searchbar_filters = { - 'all': {'label': _('All'), 'domain': [('move_type', 'in', ['in_invoice', 'out_invoice'])]}, - 'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', 'out_invoice')]}, - 'bills': {'label': _('Bills'), 'domain': [('move_type', '=', 'in_invoice')]}, + 'all': {'label': _('All'), 'domain': []}, + 'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', ('out_invoice', 'out_refund'))]}, + 'bills': {'label': _('Bills'), 'domain': [('move_type', '=', ('in_invoice', 'in_refund'))]}, } # default filter by value if not filterby: