openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #15520
[Bug 1049199] [NEW] Error on Employee unlink
Public bug reported:
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.
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1049199
Title:
Error on Employee unlink
Status in OpenERP Server:
New
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-server/+bug/1049199/+subscriptions
Follow ups
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Stefan Rijnhart (Therp), 2013-01-23
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Lara Freeke (Therp), 2013-01-23
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Amit Parik (OpenERP), 2012-12-05
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Mohamed M. Hagag, 2012-12-05
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Stefan Rijnhart (Therp), 2012-11-16
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Launchpad Bug Tracker, 2012-10-25
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Launchpad Bug Tracker, 2012-10-25
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Stefan Rijnhart (Therp), 2012-10-24
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Nehal Panchal (OpenERP), 2012-09-12
-
[Bug 1049199] Re: [6.1]Error on Employee unlink
From: Amit Parik (OpenERP), 2012-09-12
-
[Bug 1049199] Re: Error on Employee unlink
From: Amit Parik (OpenERP), 2012-09-12
-
[Bug 1049199] [NEW] Error on Employee unlink
From: Hugo Santos, 2012-09-11
References