[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
This commit is contained in:
parent
be4f579fa1
commit
5c6172df5a
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue