From 6e27ee461b41688d375a43c3ec58c84149cede86 Mon Sep 17 00:00:00 2001 From: "ajay javiya (OpenERP)" Date: Fri, 9 Nov 2012 17:43:58 +0530 Subject: [PATCH 1/4] [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 2/4] [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 3/4] [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 4/4] [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 @@