stock_location: revert the changed of company_id
bzr revid: sbh@tinyerp.com-20100621090428-iunjb471vzz3ugg2
This commit is contained in:
@@ -58,7 +58,6 @@ class procurement_order(osv.osv):
|
||||
move_obj = self.pool.get('stock.move')
|
||||
location_obj = self.pool.get('stock.location')
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
res_user=self.pool.get('res.users').browse(cr,uid,uid)
|
||||
for proc in proc_obj.browse(cr, uid, ids, context=context):
|
||||
line = None
|
||||
for line in proc.product_id.flow_pull_ids:
|
||||
@@ -68,7 +67,7 @@ class procurement_order(osv.osv):
|
||||
origin = (proc.origin or proc.name or '').split(':')[0] +':'+line.name
|
||||
picking_id = self.pool.get('stock.picking').create(cr, uid, {
|
||||
'origin': origin,
|
||||
'company_id': res_user.company_id and res_user.company_id.id or False,
|
||||
'company_id': line.company_id and line.company_id.id or False,
|
||||
'type': line.picking_type,
|
||||
'stock_journal_id': line.journal_id and line.journal_id.id or False,
|
||||
'move_type': 'one',
|
||||
@@ -79,7 +78,7 @@ class procurement_order(osv.osv):
|
||||
move_id = self.pool.get('stock.move').create(cr, uid, {
|
||||
'name': line.name,
|
||||
'picking_id': picking_id,
|
||||
'company_id': res_user.company_id and res_user.company_id.id or False,
|
||||
'company_id': line.company_id and line.company_id.id or False,
|
||||
'product_id': proc.product_id.id,
|
||||
'date_planned': proc.date_planned,
|
||||
'product_qty': proc.product_qty,
|
||||
@@ -104,7 +103,7 @@ class procurement_order(osv.osv):
|
||||
proc_id = self.pool.get('procurement.order').create(cr, uid, {
|
||||
'name': line.name,
|
||||
'origin': origin,
|
||||
'company_id': res_user.company_id and res_user.company_id.id or False,
|
||||
'company_id': line.company_id and line.company_id.id or False,
|
||||
'date_planned': proc.date_planned,
|
||||
'product_id': proc.product_id.id,
|
||||
'product_qty': proc.product_qty,
|
||||
|
||||
Reference in New Issue
Block a user