[FIX] lunch : row_number with order

row_number without order is not invariant depending on the readed
fields. The order by clause on the partition solve this.

closes odoo/odoo#33573

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
This commit is contained in:
Nicolas Seinlet
2019-05-22 13:28:04 +00:00
parent dac369453c
commit 691b0e7e6f
+1 -1
View File
@@ -69,7 +69,7 @@ class LunchProductReport(models.Model):
self._cr.execute("""
CREATE or REPLACE view %s AS (
SELECT
row_number() over () AS id,
row_number() over (ORDER BY user_id,product.id) AS id,
product.id AS product_id,
product.name,
product.category_id,