[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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user