[MERGE] base, res.users: added onchange_state() on res.users. Was crashing because the _inherits is not a real python inheritance

bzr revid: qdp-launchpad@openerp.com-20130304184144-iae1pdrrcfy6pveo
This commit is contained in:
Quentin (OpenERP) 2013-03-04 19:41:44 +01:00
commit 8d47ec5256
1 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,10 @@ class res_users(osv.osv):
}
}
def onchange_state(self, cr, uid, ids, state_id, context=None):
partner_ids = [user.partner_id.id for user in self.browse(cr, uid, ids, context=context)]
return self.pool.get('res.partner').onchange_state(cr, uid, partner_ids, state_id, context=context)
def onchange_type(self, cr, uid, ids, is_company, context=None):
""" Wrapper on the user.partner onchange_type, because some calls to the
partner form view applied to the user may trigger the