diff options
| author | Pinakin Nayi (OpenERP) <pna@tinyerp.com> | 2012-06-18 15:33:59 +0530 |
|---|---|---|
| committer | Pinakin Nayi (OpenERP) <pna@tinyerp.com> | 2012-06-18 15:33:59 +0530 |
| commit | 98f29fa47d73c8ea8284fea7a3e61a09c4ffb1e1 (patch) | |
| tree | c3c2508a89ad16b618d761ec3babed74ea4a7512 | |
| parent | 79458cc51b4860ac6b9119ed71c13cc31ade4a62 (diff) | |
[FIX] portal_wizard
bzr revid: pna@tinyerp.com-20120618100359-yw3n7ap7kacq2ror
| -rw-r--r-- | addons/portal/wizard/portal_wizard.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index ed7ec40371c..90f5a471973 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -117,7 +117,7 @@ class wizard(osv.osv_memory): if p.child_ids: user_ids.extend(map(create_user_from_address, p.child_ids)) if not p.is_company: - user_ids.append({'lang': p.lang or 'en_US', 'name': p.name,'user_email':p.email, 'partner_id': p.id}) + user_ids.extend(map(create_user_from_address, [p])) return user_ids @@ -212,9 +212,11 @@ class wizard(osv.osv_memory): add_users.append(created_user[0]) #add the user relationship in portal. - if add_users and add_users not in portal_users: + for a in add_users: + if a not in portal_users: + portal_users.append(a) portal_obj.write(cr, ROOT_UID, [wiz.portal_id.id], - {'users': [(6, 0, add_users)]}, context0) + {'users': [(6, 0,portal_users)]}, context0) #delete the user relationship from portal. portal_obj.write(cr, ROOT_UID, [wiz.portal_id.id], |
