[FIX] share,portal: some quirks in share/portal integration

bzr revid: odo@openerp.com-20110619130345-2yf5t8zbqw2zcems
This commit is contained in:
Olivier Dony 2011-06-19 15:03:45 +02:00
parent 4f1110d3d8
commit 981b3fa3e1
3 changed files with 5 additions and 5 deletions

View File

@ -9,11 +9,11 @@
<field name="inherit_id" ref="share.share_step1_form"/>
<field name="arch" type="xml">
<xpath expr="/form/group[@name='emails_group']" position="before">
<group colspan="4" col="4" groups="portal.group_portal_manager">
<group name="groups_group" colspan="4" col="4" groups="portal.group_portal_manager">
<separator colspan="4" string="Who do you want to share with?"/>
<field name="user_type" />
</group>
<group colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
<group name="user_group" colspan="4" attrs="{'invisible':[('user_type','!=','existing')]}">
<field colspan="4" nolabel="1" name="user_ids" mode="tree">
<tree string="Existing users">
<field name="login"/>
@ -21,7 +21,7 @@
</field>
</group>
<group colspan="4" attrs="{'invisible':[('user_type','!=','groups')]}">
<separator colspan="4" string="Existing Groups"/>
<separator colspan="4" string="Existing groups"/>
<field colspan="4" nolabel="1" name="group_ids" mode="tree">
<tree string="Existing groups">
<field name="name"/>

View File

@ -172,7 +172,7 @@ class share_wizard(osv.osv_memory):
current_user = user_obj.browse(cr, UID_ROOT, uid, context=context)
created_ids = []
existing_ids = []
for new_user in wizard_data.new_users.split('\n'):
for new_user in (wizard_data.new_users or '').split('\n'):
# Ignore blank lines
new_user = new_user.strip()
if not new_user: continue

View File

@ -29,7 +29,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Grant instant access to your documents">
<group colspan="4" attrs="{'invisible':[('user_type','!=','emails')]}">
<group colspan="4" name="emails_group" attrs="{'invisible':[('user_type','!=','emails')]}">
<separator colspan="4" string="Share with these people (one e-mail per line)"/>
<field colspan="4" nolabel="1" name="new_users"/>
</group>