From b43151c11c07fc41293beac447a5cb8a0ce77149 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 6 Jun 2017 12:52:10 +0200 Subject: [PATCH] [FIX] product: pricelist item deterministic order On a pricelist, if multiple rules were set with the same set of rules condition, the choice of which rule/item is used was random, according to the postgres database state. Adding the `id` in the order force to always use the same rule/item (the first that was created). opw-744865 --- addons/product/pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 8a88ee059c0..3cd8a03c24c 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -268,7 +268,7 @@ class product_pricelist(osv.osv): class product_pricelist_item(osv.osv): _name = "product.pricelist.item" _description = "Pricelist item" - _order = "applied_on, min_quantity desc, categ_id desc" + _order = "applied_on, min_quantity desc, categ_id desc, id" def _check_recursion(self, cr, uid, ids, context=None): for obj_list in self.browse(cr, uid, ids, context=context):