Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8] MRP Reopen error #28

Open
mauroanelli2017 opened this issue Feb 8, 2018 · 5 comments
Open

[8] MRP Reopen error #28

mauroanelli2017 opened this issue Feb 8, 2018 · 5 comments

Comments

@mauroanelli2017
Copy link

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 546, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 583, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 319, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 812, in call
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 412, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/mrp_reopen/mrp.py", line 119, in action_reopen
wf_service = netsvc.LocalService("workflow")
NameError: global name 'netsvc' is not defined

@ferdiga
Copy link
Collaborator

ferdiga commented Feb 8, 2018

please which branch ?

@mauroanelli2017
Copy link
Author

8.0

@ferdiga
Copy link
Collaborator

ferdiga commented Feb 9, 2018

I do not support 8.0 currently - to much difference to 6.1 which I use

try to change
import openerp.netsvc
to
from openerp import netsvc, workflow

@mauroanelli2017
Copy link
Author

done but i get this
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 546, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 583, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 319, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 812, in call
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 412, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
return old_api(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/addons/mrp_reopen/mrp.py", line 119, in action_reopen
wf_service = netsvc.LocalService("workflow")
NameError: global name 'netsvc' is not defined

@ferdiga
Copy link
Collaborator

ferdiga commented Feb 9, 2018

Here are the only lines in 8.0 referring to netsvc - it seems it is depreciated.

./server/addons/hr_expense/tests/test_journal_entries.py:2:from openerp import netsvc, workflow
./server/openerp/init.py:77:import netsvc
./server/openerp/addons/base/ir/ir_cron.py:135: netsvc.log(_logger, logging.DEBUG, 'cron.object.execute', (cr.dbname,uid,'*',model_name,method_name)+tuple(args), depth=log_depth)
./server/openerp/addons/base/ir/ir_cron.py:30:from openerp import SUPERUSER_ID, netsvc, api
./server/openerp/conf/deprecation.py:40:# If True, openerp.netsvc.LocalService() can be used to lookup reports or to
./server/openerp/conf/deprecation.py:44:# - The openerp.netsvc.LocalService() function.
./server/openerp/http.py:100: openerp.netsvc.log(rpc_request, logging.DEBUG, '%s.%s' % (service_name, method), replace_request_password(params))
./server/openerp/http.py:123: openerp.netsvc.log(rpc_response, logging.DEBUG, logline, result)
./server/openerp/http.py:125: openerp.netsvc.log(rpc_request, logging.DEBUG, logline, replace_request_password(params), depth=1)
./server/openerp/netsvc.py:48: The openerp.netsvc.LocalService() function is deprecated. It still works
./server/openerp/report/report_sxw.py:324: openerp.netsvc.LocalService() indirection and the related
./server/openerp/service/common.py:61: # openerp.netsvc.Logger class.
./server/openerp/service/server.py:811: rpc_request = logging.getLogger('openerp.netsvc.rpc.request')
./server/openerp/tools/config.py:359: openerp.netsvc.init_logger()
./server/openerp/tools/translate.py:166: # find current DB based on thread/worker db name (see netsvc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants