From 0ac081ca597c9b491dc50f9c3acee92ef9869e02 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 9 May 2012 16:26:41 +0530 Subject: [PATCH 01/14] [FIX]stock: fix the issue of return picking wizard lp bug: https://launchpad.net/bugs/997028 fixed bzr revid: mma@tinyerp.com-20120509105641-9ijemxgekhif76zc --- addons/stock/wizard/stock_return_picking.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 689f17cd9b9..8cfe4342327 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -100,7 +100,8 @@ class stock_return_picking(osv.osv_memory): valid_lines = 0 return_history = self.get_return_history(cr, uid, record_id, context) for m in pick.move_lines: - if m.product_qty * m.product_uom.factor > return_history[m.id]: + if return_history: + if m.product_qty * m.product_uom.factor > return_history[m.id]: valid_lines += 1 if not valid_lines: raise osv.except_osv(_('Warning !'), _("There are no products to return (only lines in Done state and not fully returned yet can be returned)!")) From 815ea021d8cec91331c2815cc1a9812a2eb1750c Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 27 Aug 2012 16:40:13 +0530 Subject: [PATCH 02/14] [IMP]stock:improve condition bzr revid: mma@tinyerp.com-20120827111013-x5xlu56cxtm5lqf0 --- addons/stock/wizard/stock_return_picking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 8cfe4342327..203db7232f1 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -100,7 +100,7 @@ class stock_return_picking(osv.osv_memory): valid_lines = 0 return_history = self.get_return_history(cr, uid, record_id, context) for m in pick.move_lines: - if return_history: + if return_history and return_history.get(m.id): if m.product_qty * m.product_uom.factor > return_history[m.id]: valid_lines += 1 if not valid_lines: From 0a9c1b54ca80d0cc942f99cd18539b89d5385449 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 10 Sep 2012 16:14:22 +0530 Subject: [PATCH 03/14] [IMP]stock : improve code which is more batter for return picking bzr revid: mma@tinyerp.com-20120910104422-1s9h1fq25ud2iwvs --- addons/stock/wizard/stock_return_picking.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index bc6acfaa1cc..80cc5a4a368 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -100,8 +100,7 @@ class stock_return_picking(osv.osv_memory): valid_lines = 0 return_history = self.get_return_history(cr, uid, record_id, context) for m in pick.move_lines: - if return_history and return_history.get(m.id): - if m.product_qty * m.product_uom.factor > return_history[m.id]: + if (return_history.get(m.id) is not None) and (m.product_qty * m.product_uom.factor > return_history[m.id]): valid_lines += 1 if not valid_lines: raise osv.except_osv(_('Warning!'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!")) From c0a3cbac504d4ad35b6f5111e2b235dfaab31dd8 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 14 Sep 2012 15:49:47 +0530 Subject: [PATCH 04/14] [IMP]stock : set a proper indentation bzr revid: mma@tinyerp.com-20120914101947-cbrdfp0iatq6r0a6 --- addons/stock/wizard/stock_return_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/wizard/stock_return_picking.py b/addons/stock/wizard/stock_return_picking.py index 80cc5a4a368..bc4cf652cdb 100644 --- a/addons/stock/wizard/stock_return_picking.py +++ b/addons/stock/wizard/stock_return_picking.py @@ -100,8 +100,8 @@ class stock_return_picking(osv.osv_memory): valid_lines = 0 return_history = self.get_return_history(cr, uid, record_id, context) for m in pick.move_lines: - if (return_history.get(m.id) is not None) and (m.product_qty * m.product_uom.factor > return_history[m.id]): - valid_lines += 1 + if (return_history.get(m.id) is not None) and (m.product_qty * m.product_uom.factor > return_history[m.id]): + valid_lines += 1 if not valid_lines: raise osv.except_osv(_('Warning!'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!")) return res From a49acd9fcadc6c0ed4bb39489ace3dd0c36f6315 Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Mon, 17 Sep 2012 11:53:26 +0530 Subject: [PATCH 05/14] [IMP] stock: update warning message for stock in serial number bzr revid: cha@tinyerp.com-20120917062326-ony3gx9k2o871kq3 --- addons/stock/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 31d5a68c9fe..9cdbc97c115 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1804,8 +1804,8 @@ class stock_move(osv.osv): warning = {} if (location.usage == 'internal') and (product_qty > (amount_actual or 0.0)): warning = { - 'title': _('Insufficient Stock in Lot !'), - 'message': _('You are moving %.2f %s products but only %.2f %s available in this lot.') % (product_qty, uom.name, amount_actual, uom.name) + 'title': _('Insufficient Stock in Serial Number !'), + 'message': _('You are moving %.2f %s products but only %.2f %s available in this serial number.') % (product_qty, uom.name, amount_actual, uom.name) } return {'warning': warning} From c8e57c8c059bf842fdeae0fc813fb2ae1c970ef8 Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Mon, 17 Sep 2012 12:23:36 +0530 Subject: [PATCH 06/14] [IMP] stock: change string for ok button & add cancel button in wizard bzr revid: cha@tinyerp.com-20120917065336-f1yw01itbx2ka32o --- addons/stock/wizard/stock_move_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml index 3df336b5e30..5dc0d0d824c 100644 --- a/addons/stock/wizard/stock_move_view.xml +++ b/addons/stock/wizard/stock_move_view.xml @@ -109,7 +109,9 @@
-
From c4166b869ac223014b1d63f6f15ef3ce6b285871 Mon Sep 17 00:00:00 2001 From: "Ajay Chauhan (OpenERP)" Date: Mon, 17 Sep 2012 16:05:10 +0530 Subject: [PATCH 07/14] [IMP] product: made little change to get proper view bzr revid: cha@tinyerp.com-20120917103510-crlrfrqo2rem5izd --- addons/product/product_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index 13474351744..fc511d20a62 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -447,9 +447,9 @@ -