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