[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) <lpe@odoo.com>
This commit is contained in:
Lucas Perais (lpe)
2019-03-11 10:35:06 +00:00
parent 1cdf2bdaf6
commit d8f8996424
+1 -1
View File
@@ -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):