[MERGE] auth_signup: upon signup of new user, the company_id[s] of the corresponding partner must be used
The default was to use those of the template user, which may not be correct in multi-company cases. bzr revid: odo@openerp.com-20130417073311-pu18cwlus10ypw8b
This commit is contained in:
commit
f6152a63e1
|
@ -200,6 +200,9 @@ class res_users(osv.Model):
|
|||
'partner_id': partner.id,
|
||||
'email': values.get('email') or values.get('login'),
|
||||
})
|
||||
if partner.company_id:
|
||||
values['company_id'] = partner.company_id.id
|
||||
values['company_ids'] = [(6,0,[partner.company_id.id])]
|
||||
self._signup_create_user(cr, uid, values, context=context)
|
||||
else:
|
||||
# no token, sign up an external user
|
||||
|
|
Loading…
Reference in New Issue