← Back to team overview

openerp-india team mailing list archive

[Bug 1049199] Re: [6.1]Error on Employee unlink

 

** Summary changed:

- Error on Employee unlink
+ [6.1]Error on Employee unlink

** Changed in: openobject-addons
   Importance: Undecided => Medium

** Changed in: openobject-addons
       Status: New => Confirmed

** Changed in: openobject-addons
     Assignee: (unassigned) => OpenERP Publisher's Warranty Team (openerp-opw)

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1049199

Title:
  [6.1]Error on Employee unlink

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  With the last revision of OpenERP Server
  http://bazaar.launchpad.net/~openerp/openobject-
  server/6.1/revision/4268 I obtain an error if I unlink an employee.

  Client Traceback (most recent call last):
    File "/home/hugo/openerp/sources/6.1/modules/web/common/http.py", line 180, in dispatch
      response["result"] = method(controller, self, **self.params)
    File "/home/hugo/openerp/sources/6.1/modules/web/controllers/main.py", line 1044, in call
      return self.call_common(req, model, method, args, domain_id, context_id)
    File "/home/hugo/openerp/sources/6.1/modules/web/controllers/main.py", line 996, in call_common
      return self._call_kw(req, model, method, args, {})
    File "/home/hugo/openerp/sources/6.1/modules/web/controllers/main.py", line 1010, in _call_kw
      return getattr(req.session.model(model), method)(*args, **kwargs)
    File "/home/hugo/openerp/sources/6.1/modules/web/common/openerplib/main.py", line 250, in proxy
      args, kw)
    File "/home/hugo/openerp/sources/6.1/modules/web/common/openerplib/main.py", line 117, in proxy
      result = self.connector.send(self.service_name, method, *args)
    File "/home/hugo/openerp/sources/6.1/modules/web/common/http.py", line 608, in send
      raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

  
  Server Traceback (most recent call last):
    File "/home/hugo/openerp/sources/6.1/modules/web/common/http.py", line 593, in send
      return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/netsvc.py", line 360, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/service/web_services.py", line 586, in dispatch
      res = fn(db, uid, *params)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/osv.py", line 167, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/osv.py", line 121, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/osv.py", line 164, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/hugo/openerp/sources/6.1/modules/hr/hr.py", line 189, in unlink
      return super(hr_employee, self).unlink(cr, uid, ids, context=context)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/orm.py", line 3726, in unlink
      result_store = self._store_get_values(cr, uid, ids, self._all_columns.keys(), context)
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/orm.py", line 4295, in _store_get_values
      target_ids = [id for id in function[id_mapping_fnct_](self, cr, SUPERUSER_ID, ids, context) if id]
    File "/home/hugo/openerp/sources/6.1/modules/hr/hr.py", line 85, in _get_job_position
      if employee.job_id:
    File "/home/hugo/openerp/sources/6.1/openobject-server/openerp/osv/orm.py", line 478, in __getattr__
      raise AttributeError(e)
  AttributeError: 'Field job_id not found in browse_record(hr.employee, 13)'

  I think that this error is related with this commit
  http://bazaar.launchpad.net/~openerp/openobject-
  server/6.1/revision/4262 because the field job_id is a field of
  hr.employee that is used to decide when to store a function in hr.job
  object and reverting changes to revision 4261 makes that it works as
  expected and there no are problems when trying to unlink an Employee.

  Regards.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1049199/+subscriptions


References