[IMP] share: add option to specify shared access name
bzr revid: odo@openerp.com-20110601130655-9y63unr6eus9f20e
This commit is contained in:
@@ -83,9 +83,9 @@ class share_create(osv.osv_memory):
|
||||
|
||||
def _user_type_selection(self, cr, uid, context=None):
|
||||
result = [('new','New users (emails required)'),
|
||||
('existing','Existing external users')]
|
||||
('existing','Users you already shared with')]
|
||||
if self.has_extended_share(cr, uid, context=context):
|
||||
result.append(('groups','Existing groups of users'))
|
||||
result.append(('groups','Existing groups (Portals setup only)'))
|
||||
return result
|
||||
|
||||
"""Override of create() to auto-compute the action name"""
|
||||
@@ -123,7 +123,7 @@ class share_create(osv.osv_memory):
|
||||
def go_step_1(self, cr, uid, ids, context=None):
|
||||
dummy, step1_form_view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'share_step1_form')
|
||||
return {
|
||||
'name': _('Configure shared access'),
|
||||
'name': _('Grant instant access to your documents'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'share.wizard',
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="model">share.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Share wizard: preparation">
|
||||
<form string="Sharing: preparation">
|
||||
<separator colspan="4"
|
||||
string="Please select the action that opens the screen containing the data you want to share."/>
|
||||
<field name="action_id" colspan="4"/>
|
||||
@@ -28,7 +28,11 @@
|
||||
<field name="model">share.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Setup shared access">
|
||||
<form string="Grant instant access to your documents">
|
||||
<group colspan="4" attrs="{'invisible':[('has_user_email','!=',False)]}">
|
||||
<label colspan="4" string="/!\ E-mail notifications are unavailable until you setup an email address in your preferences"/>
|
||||
<field name="has_user_email" invisible="1"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Who would you want to share this data with?"/>
|
||||
<field name="user_type"/>
|
||||
<group colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
|
||||
@@ -40,7 +44,7 @@
|
||||
</field>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('user_type','!=','new')]}">
|
||||
<separator colspan="4" string="New Users (please provide one e-mail address per line below)"/>
|
||||
<separator colspan="4" string="New Users (please provide one e-mail address per line"/>
|
||||
<field colspan="4" nolabel="1" name="new_users"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('user_type','!=','groups')]}">
|
||||
@@ -51,17 +55,10 @@
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
<separator colspan="4" string="Name the new shared view:"/>
|
||||
<group colspan="4">
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<separator colspan="4" string="Select the desired shared access mode:"/>
|
||||
<separator colspan="4" string="Additional Options"/>
|
||||
<group colspan="4">
|
||||
<field name="access_mode"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('has_user_email','!=',False)]}">
|
||||
<label colspan="4" string="/!\ Sharing via e-mail is disabled because you don't have an email address in your preferences"/>
|
||||
<field name="has_user_email" invisible="1"/>
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4">
|
||||
|
||||
Reference in New Issue
Block a user