Ambiguous column name in group by part of Move.compute_quantities_query
The query returned by compute_quantitites_query doesn't contains the table alias in the group by part (example with stock_lot installed):
... ) GROUP BY "b"."from_location", "product", "lot" UNION ALL
It means that if you extend the query adding a join of a table with "product" column (for example, stock_lot table), it generates a "ProgrammingError: column reference "product" is ambiguous" error
File "/home/guillem/nan/projectes/tryton/calfruitos/trytond/trytond/backend/postgresql/database.py", line 315, in execute
return self.cursor.execute(sql, params)
ProgrammingError: column reference "product" is ambiguous
LINE 1: ..."e"."active" = true)) GROUP BY "d"."to_location", "product",...
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
unnamed | @guillemNaN | 2016-10-10 13:50:21.260000 UTC | text/plain |