[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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user