From 1ec6a384fa041385485de7cac291d14d00fb802a Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Thu, 17 Mar 2016 13:57:17 +0100 Subject: [PATCH] [FIX] point_of_sale: order product.product consistently with backend In the backend product.product records are not just ordered on their name, they are first ordered on default_code and then on name. The POS should order records the same way. opw-672284 --- addons/point_of_sale/static/src/js/models.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index b0513e53f8e..fa8079def79 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -317,7 +317,7 @@ exports.PosModel = Backbone.Model.extend({ fields: ['display_name', 'list_price','price','pos_categ_id', 'taxes_id', 'barcode', 'default_code', 'to_weight', 'uom_id', 'description_sale', 'description', 'product_tmpl_id'], - order: ['sequence','name'], + order: ['sequence','default_code','name'], domain: [['sale_ok','=',true],['available_in_pos','=',true]], context: function(self){ return { pricelist: self.pricelist.id, display_default_code: false }; }, loaded: function(self, products){