From 1ebd36f74f699b4e4d8381db125e97cbe37ab4f7 Mon Sep 17 00:00:00 2001 From: sergio-teruel Date: Fri, 14 Oct 2022 10:27:00 +0200 Subject: [PATCH] [FIX] partner_pricelist_search: Remove list type also from search arguments --- partner_pricelist_search/models/res_partner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/partner_pricelist_search/models/res_partner.py b/partner_pricelist_search/models/res_partner.py index 713421fbe..2c3830102 100644 --- a/partner_pricelist_search/models/res_partner.py +++ b/partner_pricelist_search/models/res_partner.py @@ -1,10 +1,10 @@ # Copyright 2021 Tecnativa - Carlos Dauden -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models -class Pricelist(models.Model): +class ResPartner(models.Model): _inherit = "res.partner" property_product_pricelist = fields.Many2one( @@ -16,12 +16,12 @@ class Pricelist(models.Model): # Substitute pricelist tuple partner_domain = [ (1, "=", 1) - if (isinstance(x, tuple) and x[0] == "property_product_pricelist") + if (isinstance(x, (list, tuple)) and x[0] == "property_product_pricelist") else x for x in args ] return super( - Pricelist, self.with_context(search_partner_domain=partner_domain) + ResPartner, self.with_context(search_partner_domain=partner_domain) ).search( args, offset=offset,