[IMP] stock: simplify double browse used for chaining relations
bzr revid: rco@openerp.com-20120725135127-6y3km4b35ebx96lr
This commit is contained in:
@@ -1728,9 +1728,8 @@ class stock_move(osv.osv):
|
||||
return location_id
|
||||
|
||||
def _default_destination_address(self, cr, uid, context=None):
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
|
||||
partner_id = self.pool.get('res.company').browse(cr, uid, company_id, context=context).partner_id.id
|
||||
return partner_id
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
return user.company_id.partner_id.id
|
||||
|
||||
_defaults = {
|
||||
'location_id': _default_location_source,
|
||||
|
||||
Reference in New Issue
Block a user