Use a new strategy: documents are shared with a temporary group, and when everything is setup, the access rights are copied to the groups we are sharing with, and the rules are transferred to them. The temporary group is then deleted. This works well for multiple shares, are both access rights and rules are additive in this fashion. bzr revid: odo@openerp.com-20110619170000-epst11y4aaichblh
54 lines
2.6 KiB
XML
54 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record id="share_step1_form_portal" model="ir.ui.view">
|
|
<field name="name">share.step1.form.portal</field>
|
|
<field name="model">share.wizard</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="share.share_step1_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="/form/group[@name='emails_group']" position="before">
|
|
<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 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"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group colspan="4" attrs="{'invisible':[('user_type','!=','groups')]}">
|
|
<field colspan="4" nolabel="1" name="group_ids" mode="tree">
|
|
<tree string="Existing groups">
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="share_step2_form_portal" model="ir.ui.view">
|
|
<field name="name">share.step2.form.portal</field>
|
|
<field name="model">share.wizard</field>
|
|
<field name="type">form</field>
|
|
<field name="inherit_id" ref="share.share_step2_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="/form/field[@name='result_line_ids']/tree/field[@name='login']" position="after">
|
|
<field name="share_url" groups="portal.group_portal_manager"/>
|
|
</xpath>
|
|
<xpath expr="/form/field[@name='result_line_ids']/form/field[@name='login']" position="after">
|
|
<field name="share_url" colspan="4" groups="portal.group_portal_manager"/>
|
|
</xpath>
|
|
<xpath expr="/form/field[@name='result_line_ids']" position="after">
|
|
<field colspan="4" name="share_root_url" groups="portal.group_portal_manager"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|