Files
odoo_source/addons/mail/res_users_view.xml
T
Christophe Simonis 98c1a82e68 [FIX] mail, share: correct module update.
a6eac0f08e introduced a new `res.groups`
belonging to the "Sharing" category.
As this group has the flag `shared`, it is ignore when generating the
group's user view (and its virtual fields).

When updating `mail` module, the `share` module (which depend on mail)
is not loaded yet. This mean this new group is taken into account when
getting the `res.users` virtual fields.
As this group belong to the same category as the `share.group_share_user`
group but dont have an inheritance link between them (`implied_ids`),
they are generated as `boolean` instead of a single entry `selection`
field. This create a missmatch between the fields and the previously
generated view, which forbid inheritance application.

Force view regeneration, to avoid it.

Also change the group's category as this group is purely technical and
must be hidden anyway.
2015-03-17 19:29:54 +01:00

61 lines
3.1 KiB
XML

<?xml version="1.0"?>
<openerp>
<data>
<!-- Update Preferences form !-->
<record id="view_users_form_simple_modif_mail" model="ir.ui.view">
<field name="name">res.users.preferences.form.mail</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif"/>
<field name="arch" type="xml">
<data>
<field name="email" position="before">
<field name="notify_email" widget="radio" readonly="0"/>
</field>
</data>
</field>
</record>
<!-- Force update of groups' user view.
When updating (not new install), as `share` module is not loaded yet, shared groups
are taken into account when getting the group list, resulting to a different
organisation of the `Sharing` category (booleans instead of a selection) and thus,
different virtual field names.
When applying then inheritance of the following view, the check of field names
failed due to these virtual field name missmatch.
This is only for databases updated between a6eac0f08ee9100d1a44a4068d4f580b1c7c4b2c
and the commit introducing this line.
-->
<function model="res.groups" name="update_user_groups_view" />
<!-- Update user form !-->
<record id="view_users_form_mail" model="ir.ui.view">
<field name="name">res.users.form.mail</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<data>
<field name="signature" position="before">
<field name="notify_email" widget="radio"/>
</field>
<field name="signature" position="before">
<label for="alias_id" string="Messaging Alias" class="oe_read_only"
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
<field name="alias_id" class="oe_read_only" required="0" nolabel="1"
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
<label for="alias_name" string="Messaging Alias" class="oe_edit_only"
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
<div class="oe_edit_only" attrs="{'invisible': [('alias_domain', '=', False)]}">
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
<field name="alias_contact" string="Alias Accepts Emails From"
attrs="{'invisible': [('alias_domain', '=', False)]}"/>
<field name="display_groups_suggestions" groups="base.group_no_one"/>
</field>
</data>
</field>
</record>
</data>
</openerp>