From 3dfbdc403e8b3bbba9afaec3bb7c4dbcdce81c32 Mon Sep 17 00:00:00 2001
From: jadir-bs <jadir@brainstation-23.com>
Date: Tue, 23 May 2023 19:35:33 +0000
Subject: [PATCH] [FIX] account : fixes wrong domain of invoice and bill, uses
 'in' operator to match move_type against a tuple instead of '=' operator.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

closes odoo/odoo#126762

X-original-commit: 95d115aad5ffb4d028d7832f9c6923c1e0b1af24
Signed-off-by: William André (wan) <wan@odoo.com>
---
 addons/account/controllers/portal.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/addons/account/controllers/portal.py b/addons/account/controllers/portal.py
index c3dd7e2b1bbc..1aef9ace37be 100644
--- a/addons/account/controllers/portal.py
+++ b/addons/account/controllers/portal.py
@@ -52,8 +52,8 @@ class PortalAccount(CustomerPortal):
 
         searchbar_filters = {
             'all': {'label': _('All'), 'domain': []},
-            'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', ('out_invoice', 'out_refund'))]},
-            'bills': {'label': _('Bills'), 'domain': [('move_type', '=', ('in_invoice', 'in_refund'))]},
+            'invoices': {'label': _('Invoices'), 'domain': [('move_type', 'in', ('out_invoice', 'out_refund'))]},
+            'bills': {'label': _('Bills'), 'domain': [('move_type', 'in', ('in_invoice', 'in_refund'))]},
         }
         # default filter by value
         if not filterby:
-- 
GitLab