[FIX] base: allow all users (including portals) to change their avatar

Force readonly="0" on field image in preferences view, otherwise the readonly can be set by access rights.
Preferences are written with the UID 1, if the fields are in the WRITEABLE FIELDS list of the object res_users.
This is why any users can edit their preferences even if they do not have the rights to write on res.users.
Forcing readonly="0" to make fields editable in the form.

bzr revid: dle@openerp.com-20131204145923-f7jwoah722q188d7
This commit is contained in:
Denis Ledoux
2013-12-04 15:59:23 +01:00
parent c0c971b87a
commit 0721a21966
+1 -1
View File
@@ -246,7 +246,7 @@
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<form string="Users" version="7.0">
<field name="image" widget='image' class="oe_right oe_avatar" options='{"preview_image": "image_small"}'/>
<field name="image" readonly="0" widget='image' class="oe_right oe_avatar" options='{"preview_image": "image_small"}'/>
<h1>
<field name="name" readonly="1" class="oe_inline"/>
(<field name="login" readonly="1" class="oe_inline"/>)