From 88302f5437cd84e5f8c94250ea1cf98b5cf844b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 21 Feb 2018 14:34:58 +0100 Subject: [PATCH] Ensure grouping has no duplicate fields Otherwise it generates ambiguous SQL query. issue7141 --- move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/move.py b/move.py index 0a6be71c41..c2bcc69510 100644 --- a/move.py +++ b/move.py @@ -1021,6 +1021,7 @@ class Move(Workflow, ModelSQL, ModelView): if field not in Model._fields: raise ValueError('"%s" has no field "%s"' % (Model, field)) assert grouping_filter is None or len(grouping_filter) == len(grouping) + assert len(set(grouping)) == len(grouping) move_rule_query = Rule.query_get('stock.move')