[IMP] add url to portal, and improve form view
bzr revid: rco@openerp.com-20110526134009-38ueubagxjj8122r
This commit is contained in:
parent
9c75110fc5
commit
d05232a26e
|
@ -40,6 +40,8 @@ class portal(osv.osv):
|
|||
'portal_group_rel', 'portal_id', 'group_id',
|
||||
string='Other User Groups',
|
||||
help="Those groups are assigned to the portal's users"),
|
||||
'url': fields.char('URL', size=64,
|
||||
help="The url where portal users can connect to the server"),
|
||||
'menu_action_id': fields.many2one('ir.actions.act_window', readonly=True,
|
||||
# ISSUE: 'ondelete' constraints do not seem effective on this field...
|
||||
string='Menu Action',
|
||||
|
@ -192,8 +194,8 @@ class portal_override_menu(osv.osv):
|
|||
_columns = {
|
||||
'override_menu': fields.function(
|
||||
_get_override_menu, fnct_inv=_set_override_menu,
|
||||
type='boolean', method=True, string='Override Users Menu Action',
|
||||
help='Enable this option to create the Menu Action'),
|
||||
type='boolean', method=True, string='Override Menu Action of Users',
|
||||
help='Enable this option to override the Menu Action of portal users'),
|
||||
}
|
||||
|
||||
portal_override_menu()
|
||||
|
|
|
@ -42,16 +42,25 @@ the portal's users.
|
|||
<field name="arch" type="xml">
|
||||
<page string="Users" position="before">
|
||||
<page string="Portal">
|
||||
<separator string="Portal Menu" colspan="4"/>
|
||||
<field name="menu_action_id"/>
|
||||
<field name="override_menu"/>
|
||||
<field name="parent_menu_id"
|
||||
context="{'ir.ui.menu.full_list': True}"/>
|
||||
<button name="do_create_menu" type="object"
|
||||
string="Create Parent Menu"/>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Website" colspan="2"/>
|
||||
<field name="url"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Portal Menu" colspan="2"/>
|
||||
<field name="override_menu"/>
|
||||
<field name="parent_menu_id"
|
||||
context="{'ir.ui.menu.full_list': True}"/>
|
||||
<label colspan="1"/>
|
||||
<button name="do_create_menu" type="object"
|
||||
string="Create Parent Menu"/>
|
||||
</group>
|
||||
<separator string="Other Groups assigned to Users" colspan="2"/>
|
||||
<separator string="Widgets assigned to Users" colspan="2"/>
|
||||
<field name="other_group_ids" nolabel="1" colspan="2"/>
|
||||
<!-- load group_id in order to exclude it from other_group_ids -->
|
||||
<field name="group_id" invisible="1"/>
|
||||
<field name="other_group_ids" nolabel="1" colspan="2"
|
||||
domain="[('id', '!=', group_id)]"/>
|
||||
<field name="widget_ids" nolabel="1" colspan="2">
|
||||
<tree string="Widgets" editable="bottom">
|
||||
<field name="sequence"/>
|
||||
|
|
|
@ -140,7 +140,7 @@ class wizard(osv.osv_memory):
|
|||
context['lang'] = data['context_lang']
|
||||
data['company'] = user.company_id.name
|
||||
data['db'] = cr.dbname
|
||||
data['url'] = "(missing url)"
|
||||
data['url'] = wiz.portal_id.url or "(missing url)"
|
||||
|
||||
email_from = user.user_email
|
||||
email_to = data['user_email']
|
||||
|
|
Loading…
Reference in New Issue