Ensure grouping has no duplicate fields

Otherwise it generates ambiguous SQL query.

issue7141
This commit is contained in:
Cédric Krier committed 2018-02-21 14:34:58 +01:00
1 parent 8c326b8ae0
commit 88302f5437
1 file changed
+1
+1
View File
@@ -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')