smsalah / hr_pyzk

Odoo Module for Attendance from ZKTeco Devices
GNU General Public License v3.0
18 stars 22 forks source link

Running wizard issue #7

Open albosta opened 5 years ago

albosta commented 5 years ago

Odoo Server Error Traceback (most recent call last): File "/odoo/odoo-server/odoo/http.py", line 654, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo/odoo-server/odoo/http.py", line 312, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise raise value File "/odoo/odoo-server/odoo/http.py", line 696, in dispatch result = self._call_function(self.params) File "/odoo/odoo-server/odoo/http.py", line 344, in _call_function return checked_call(self.db, *args, *kwargs) File "/odoo/odoo-server/odoo/service/model.py", line 97, in wrapper return f(dbname, args, kwargs) File "/odoo/odoo-server/odoo/http.py", line 337, in checked_call result = self.endpoint(*a, kw) File "/odoo/odoo-server/odoo/http.py", line 939, in call return self.method(*args, *kw) File "/odoo/odoo-server/odoo/http.py", line 517, in response_wrap response = f(args, kw) File "/odoo/odoo-server/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {}) File "/odoo/odoo-server/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 749, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 736, in _call_kw_multi result = method(recs, *args, **kwargs) File "/odoo/odoo-server/addons/hr_pyzk/wizard/user_wizard.py", line 22, in import_users unique_data = c.DeviceUsers.get_users(devices) File "/odoo/odoo-server/addons/hr_pyzk/controllers/controller.py", line 25, in get_users return unique_data UnboundLocalError: local variable 'unique_data' referenced before assignment