From c850875ca386d81c69f02aa6614bb290b4264cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 2 Oct 2012 12:04:20 +0200 Subject: [PATCH 01/26] [FIX] point_of_sale: Number.isNaN is not supported on older but supported browsers bzr revid: fva@openerp.com-20121002100420-pcvbn7qqxyp62bzw --- addons/point_of_sale/static/src/js/widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 47a527a010d..72e7c5c1612 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -712,7 +712,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa }); this.$('.button.set_weight').click(function(){ var kg = Number(self.$('input.weight').val()); - if(!Number.isNaN(kg)){ + if(!isNaN(kg)){ self.pos.proxy.debug_set_weight(kg); } }); From 0fa7da31685d353e1d397f0f078629447ec9660e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20van=20der=20Essen?= Date: Tue, 2 Oct 2012 12:13:53 +0200 Subject: [PATCH 02/26] [WIP FIX] point_of_sale: investigating a bug with codebar scanning in subcategories bzr revid: fva@openerp.com-20121002101353-imjbqe1vxtdjbqu7 --- addons/point_of_sale/static/src/js/devices.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/point_of_sale/static/src/js/devices.js b/addons/point_of_sale/static/src/js/devices.js index 142d35bd340..f998ed334df 100644 --- a/addons/point_of_sale/static/src/js/devices.js +++ b/addons/point_of_sale/static/src/js/devices.js @@ -432,13 +432,13 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal // The barcode readers acts as a keyboard, we catch all keyup events and try to find a // barcode sequence in the typed keys, then act accordingly. $('body').delegate('','keyup', function (e){ - + console.log('keyup:'+String.fromCharCode(e.keyCode)+' '+e.keyCode,e); //We only care about numbers - if (!isNaN(Number(String.fromCharCode(e.keyCode)))) { + if (e.keyCode >= 48 && e.keyCode < 58){ // The barcode reader sends keystrokes with a specific interval. // We look if the typed keys fit in the interval. - if (codeNumbers.length==0) { + if (codeNumbers.length === 0) { timeStamp = new Date().getTime(); } else { if (lastTimeStamp + 30 < new Date().getTime()) { @@ -449,7 +449,7 @@ function openerp_pos_devices(instance,module){ //module is instance.point_of_sal } codeNumbers.push(e.keyCode - 48); lastTimeStamp = new Date().getTime(); - if (codeNumbers.length == 13) { + if (codeNumbers.length === 13) { //We have found what seems to be a valid codebar self.on_ean(codeNumbers.join('')); codeNumbers = []; From 6e27ee461b41688d375a43c3ec58c84149cede86 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Fri, 9 Nov 2012 17:43:58 +0530 Subject: [PATCH 03/26] [FIX]: Fix issue in warehouse module bzr revid: aja@tinyerp.com-20121109121358-4ws1vlcrteq0ckv4 --- addons/stock/stock_view.xml | 6 +++--- addons/stock/wizard/stock_fill_inventory.py | 14 ++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 9c2a672caf7..d548495d972 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -114,7 +114,7 @@
-
@@ -1234,8 +1234,8 @@ - - + + diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index 11907b674a1..1d3b8dd450d 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -60,9 +60,6 @@ class stock_fill_inventory(osv.osv_memory): if context.get('active_id', False): stock = self.pool.get('stock.inventory').browse(cr, uid, context.get('active_id', False)) - - if stock.state == 'done': - raise osv.except_osv(_('Warning!'), _('Stock Inventory is already Validated.')) return True def fill_inventory(self, cr, uid, ids, context=None): @@ -126,22 +123,23 @@ class stock_fill_inventory(osv.osv_memory): res[location] = datas if not flag: - raise osv.except_osv(_('Warning!'), _('No product in this location.')) + raise osv.except_osv(_('Warning!'), _('No product in this location. Please select a location in the product form.')) for stock_move in res.values(): for stock_move_details in stock_move.values(): stock_move_details.update({'inventory_id': context['active_ids'][0]}) domain = [] - - if fill_inventory.set_stock_zero: - stock_move_details.update({'product_qty': 0}) - for field, value in stock_move_details.items(): + if field == 'product_qty' and fill_inventory.set_stock_zero: + domain.append((field, 'in', [value,'0'])) + continue domain.append((field, '=', value)) line_ids = inventory_line_obj.search(cr, uid, domain, context=context) if not line_ids: + if fill_inventory.set_stock_zero: + stock_move_details.update({'product_qty': 0}) inventory_line_obj.create(cr, uid, stock_move_details, context=context) return {'type': 'ir.actions.act_window_close'} From ba2f569d6debac69000c10ee8b6db5a9985abd39 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 9 Nov 2012 17:46:06 +0530 Subject: [PATCH 04/26] [IMP] add placeholder in procurement order. bzr revid: tpa@tinyerp.com-20121109121606-vku2c5zzukv185b1 --- addons/procurement/procurement_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index 42179b17f92..cc922f70dc5 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -56,7 +56,7 @@

From 269117635f746bed544275f32fbcef50e39c82ea Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 12 Nov 2012 11:44:01 +0530 Subject: [PATCH 05/26] [FIX] stock: meke type field to selection from related field. bzr revid: tpa@tinyerp.com-20121112061401-jcqef7rxk0rw54g0 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 606cb9247d5..6a5b5745313 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1725,7 +1725,7 @@ class stock_move(osv.osv): # used for colors in tree views: 'scrapped': fields.related('location_dest_id','scrap_location',type='boolean',relation='stock.location',string='Scrapped', readonly=True), - 'type': fields.related('picking_id', 'type', type='selection', selection=[('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')], string='Shipping Type'), + 'type': fields.selection( (('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal')), 'Shipping Type', select=True), } def _check_location(self, cr, uid, ids, context=None): From 8ed98ddec39fd774892420e40d15823f2baa4747 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 12 Nov 2012 12:32:24 +0530 Subject: [PATCH 06/26] [IMP] procurement: apply group on product_uom field. bzr revid: tpa@tinyerp.com-20121112070224-md1utssp0qd99x69 --- addons/procurement/procurement_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index cc922f70dc5..a0d51c87713 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -77,7 +77,7 @@