~cubicerp/openobject-server/7.0-fix-bug-1073087-multicompany-access-denied

« back to all changes in this revision

Viewing changes to openerp/addons/base/res/res_users.py

  • Committer: Quentin (OpenERP)
  • Date: 2013-03-04 18:41:44 UTC
  • mfrom: (4867.1.1 7.0-res-user-fix)
  • Revision ID: qdp-launchpad@openerp.com-20130304184144-iae1pdrrcfy6pveo
[MERGE] base, res.users: added onchange_state() on res.users. Was crashing because the _inherits is not a real python inheritance

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
                }
173
173
        }
174
174
 
 
175
    def onchange_state(self, cr, uid, ids, state_id, context=None):
 
176
        partner_ids = [user.partner_id.id for user in self.browse(cr, uid, ids, context=context)]
 
177
        return self.pool.get('res.partner').onchange_state(cr, uid, partner_ids, state_id, context=context)
 
178
 
175
179
    def onchange_type(self, cr, uid, ids, is_company, context=None):
176
180
        """ Wrapper on the user.partner onchange_type, because some calls to the
177
181
            partner form view applied to the user may trigger the