From 5c6172df5aa85a6c4301d27922cad99a5fdd4efb Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 4 Nov 2010 10:30:13 +0530 Subject: [PATCH] [FIX]mrp: raises exception error when mrp module produce product with mark Track Manufacturing Lots lp bug: https://launchpad.net/bugs/669210 fixed bzr revid: ron@tinyerp.com-20101104050013-pk01lxfs91163uih --- addons/stock/stock.py | 2 +- addons/stock/wizard/stock_invoice_onshipping.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 735fb47dde8..1c3b31a353b 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2231,7 +2231,7 @@ class stock_move(osv.osv): quantity_rest = quantity uos_qty_rest = uos_qty if move.product_id.track_production and location_id: - res += self.split_lines(cr, uid, [move.id], quantity_rest, split_by_qty=1, context=context) + res += self.action_split(cr, uid, [move.id], quantity_rest, split_by_qty=1, context=context) else: res += [move.id] update_val = { diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py index 3d468129d74..38b384cdcde 100644 --- a/addons/stock/wizard/stock_invoice_onshipping.py +++ b/addons/stock/wizard/stock_invoice_onshipping.py @@ -28,18 +28,17 @@ class stock_invoice_onshipping(osv.osv_memory): def _get_journal_id(self, cr,uid,ids, context=None): if context is None: context = {} - if ids['active_model'] == "stock.picking": pick_obj = self.pool.get('stock.picking').browse(cr,uid,ids['active_id']) acct_obj = self.pool.get('account.journal') vals=[] - if pick_obj.type == 'in': + if pick_obj.type == 'out': value = acct_obj.search(cr, uid, [('type', 'in',('sale','sale_refund') )]) for jr_type in acct_obj.browse(cr, uid, value, context=context): t1 = jr_type.id,jr_type.name vals.append(t1) - elif pick_obj.type == 'out': + elif pick_obj.type == 'in': value = acct_obj.search(cr, uid, [('type', 'in',('purchase','purchase_refund') )]) for jr_type in acct_obj.browse(cr, uid, value, context=context): t1 = jr_type.id,jr_type.name