[IMP] portal: added the home_action feature for portal users

bzr revid: qdp-launchpad@openerp.com-20120423152924-ml1n9jzk1yc2e8en
This commit is contained in:
Quentin (OpenERP) 2012-04-23 17:29:24 +02:00
parent 5bd99add3e
commit ce725caeae
3 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,9 @@ class portal(osv.osv):
help='The group corresponding to this portal'),
'url': fields.char('URL', size=64,
help="The url where portal users can connect to the server"),
'home_action_id': fields.many2one('ir.actions.actions',
string='Home Action',
help="if set, replaces the standard home action (first screen after loggin) for the portal's users"),
'menu_action_id': fields.many2one('ir.actions.act_window', readonly=True,
# ISSUE: 'ondelete' constraints do not seem effective on this field...
string='Menu Action',

View File

@ -64,6 +64,7 @@ the portal's users.
<label colspan="1"/>
<button name="do_create_menu" type="object"
string="Create Parent Menu"/>
<field name="home_action_id"/>
</group>
</page>
</page>

View File

@ -146,6 +146,7 @@ class wizard(osv.osv_memory):
'user_email': u.user_email,
'context_lang': u.lang,
'share': True,
'action_id': wiz.portal_id.home_action_id and wiz.portal_id.home_action_id.id or False,
'partner_id': u.partner_id and u.partner_id.id,
} for u in wiz.user_ids if u.user_email not in existing_logins ]
portal_obj.write(cr, ROOT_UID, [wiz.portal_id.id],