From d8f8996424bbd04e17a857b5a88b373f2ce219f7 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 11 Mar 2019 09:29:11 +0000 Subject: [PATCH] [FIX] website_sale: search abandoned cart negated domain Search for orders that are not abandoned Before this commit, the same results for abandoned and not abandoned were returned This was because the not abandoned domain was not negated with the '!' operator that expression.distribute_not() relies on After this commit, the abandoned domain is negated OPW 1942311 closes odoo/odoo#31739 Signed-off-by: Lucas Perais (lpe) --- addons/website_sale/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/models/sale_order.py b/addons/website_sale/models/sale_order.py index 6fb01886d20..101b87fee49 100644 --- a/addons/website_sale/models/sale_order.py +++ b/addons/website_sale/models/sale_order.py @@ -70,7 +70,7 @@ class SaleOrder(models.Model): # is_abandoned domain possibilities if (operator not in expression.NEGATIVE_TERM_OPERATORS and value) or (operator in expression.NEGATIVE_TERM_OPERATORS and not value): return abandoned_domain - return expression.distribute_not(abandoned_domain) # negative domain + return expression.distribute_not(['!'] + abandoned_domain) # negative domain @api.multi def _cart_find_product_line(self, product_id=None, line_id=None, **kwargs):