[IMP] user preference is regular wizard
bzr revid: al@openerp.com-20120808191244-i60ximtj3m39od7r
This commit is contained in:
parent
a90423f771
commit
c289313a53
|
@ -534,6 +534,18 @@ class users(osv.osv):
|
|||
return self.write(cr, uid, uid, {'password': new_passwd})
|
||||
raise osv.except_osv(_('Warning!'), _("Setting empty passwords is not allowed for security reasons!"))
|
||||
|
||||
def preference_save(self, cr, uid, ids, context=None):
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'reload',
|
||||
}
|
||||
|
||||
def preference_change_password(self, cr, uid, ids, context=None):
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'change_password',
|
||||
}
|
||||
|
||||
def has_group(self, cr, uid, group_ext_id):
|
||||
"""Checks whether user belongs to given group.
|
||||
|
||||
|
|
|
@ -201,7 +201,6 @@
|
|||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Users" version="7.0">
|
||||
<sheet>
|
||||
<div class="oe_right oe_avatar">
|
||||
<field name="image_small" widget='image' class="oe_image_small"/>
|
||||
</div>
|
||||
|
@ -221,7 +220,11 @@
|
|||
<field name="user_email" widget="email" readonly="0"/>
|
||||
<field name="signature" readonly="0"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button name="preference_save" type="object" string="Save"/>
|
||||
<button name="preference_cancel" special="cancel" string="Cancel"/>
|
||||
<button name="preference_change_password" type="object" string="Change password"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -229,14 +232,9 @@
|
|||
<field name="name">Change My Preferences</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">res.users</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form,tree</field>
|
||||
<field name="domain">[('id','=',uid)]</field>
|
||||
</record>
|
||||
<record id="action_res_users_my_view1" model="ir.actions.act_window.view">
|
||||
<field eval="20" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="act_window_id" ref="action_res_users_my"/>
|
||||
<field name="view_mode">form</field>
|
||||
</record>
|
||||
<record id="action_res_users_my_view2" model="ir.actions.act_window.view">
|
||||
<field eval="10" name="sequence"/>
|
||||
|
|
Loading…
Reference in New Issue