[imp] made changes in method according to new changes in trunk

bzr revid: han@tinyerp.com-20110907123600-wror3ptq3n9ltipo
This commit is contained in:
Hardik Ansodariy (OpenERP) 2011-09-07 18:06:00 +05:30
parent 4e0654bcbb
commit 33abe0cd3a
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ class stock_invoice_onshipping(osv.osv_memory):
context = {}
stock = self.pool.get('stock.picking')
stock_browse = stock.browse(cr, uid, context.get('active_id'))
if stock_browse.sale_id:
if stock_browse.type == 'out':
type_inv = 'out'
elif stock_browse.purchase_id:
elif stock_browse.type == 'in':
type_inv = 'in'
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
company_id = context.get('company_id', user.company_id.id)