stock:Fix the small bug in move

bzr revid: sbh@tinyerp.com-20100528114917-ft0jk5w7ioee47ed
This commit is contained in:
sbh (Open ERP) 2010-05-28 17:19:17 +05:30
parent c4368eae03
commit e382e9fa0e
1 changed files with 6 additions and 4 deletions

View File

@ -1624,20 +1624,22 @@ class stock_move(osv.osv):
if (move.location_id.usage=='internal' and move.location_dest_id.usage=='customer') or \
(move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\
and move.location_id.company_id.id!=move.location_dest_id.company_id.id):
print "<<<<<<<<<<<<<<s<<<<<<<<"
sale.append(self.create_account_move(cr,uid,move,account_variation ,acc_dest,amount,context))
if (move.location_id.usage =='supplier' and move.location_dest_id.usage=='internal') or\
(move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\
and move.location_id.company_id.id!=move.location_dest_id.company_id.id):
print "<<<<<<<<<<<<<<puuuuuuuuuuuuuuuuu<<<<<<<<"
purchase.append(self.create_account_move(cr,uid,move,acc_src ,account_variation,amount,context))
lines=sale[0] +purchase[0]
move_obj.create(cr, uid, {
'name': move.name,
'journal_id': journal_id,
'type':'cont_voucher',
'line_id':lines,
'line_id':(purchase and purchase[0]) or( sale and sale[0]),
'ref': move.picking_id and move.picking_id.name,
})
tracking_lot = False