From a6badd25597e5e0930cb014fe94db754dae32c8f Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli <nim@odoo.com> Date: Wed, 13 Jan 2016 14:42:26 +0100 Subject: [PATCH] Revert "[FIX] product: sort pricelist items by sequence" This reverts commit 98e5673c908fe4d72e55a068a951700cc93ee33f. Sequence should not be taken into account since the default order is clear enough for the user. --- addons/product/pricelist.py | 4 ++-- addons/product/pricelist_view.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index bcd81241621e..ab8c84f6433d 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -148,7 +148,7 @@ class product_pricelist(osv.osv): 'AND (categ_id IS NULL OR categ_id = any(%s)) ' 'AND (pricelist_id = %s) ' 'AND ((i.date_start IS NULL OR i.date_start<=%s) AND (i.date_end IS NULL OR i.date_end>=%s))' - 'ORDER BY sequence, applied_on, min_quantity desc', + 'ORDER BY applied_on, min_quantity desc', (prod_tmpl_ids, prod_ids, categ_ids, pricelist.id, date, date)) item_ids = [x[0] for x in cr.fetchall()] @@ -251,7 +251,7 @@ class product_pricelist(osv.osv): class product_pricelist_item(osv.osv): _name = "product.pricelist.item" _description = "Pricelist item" - _order = "sequence, applied_on, min_quantity desc" + _order = "applied_on, min_quantity desc" def _check_recursion(self, cr, uid, ids, context=None): for obj_list in self.browse(cr, uid, ids, context=context): diff --git a/addons/product/pricelist_view.xml b/addons/product/pricelist_view.xml index 64f2a6d751e6..db191649c618 100644 --- a/addons/product/pricelist_view.xml +++ b/addons/product/pricelist_view.xml @@ -134,7 +134,6 @@ <separator string="Pricelist Items"/> <field name="item_ids" nolabel="1" context="{'default_base':'list_price'}"> <tree string="Pricelist Items"> - <field name="sequence" widget="handle"/> <field name="name" string="Applicable On"/> <field name="min_quantity"/> <field name="date_start"/> -- GitLab