-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Description
I'm checking my access rights for a model that i know doesn't exist using the following code:
models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(self.odoo_url)) return models.execute_kw(self.odoo_db, self.uid, self.password, model, 'check_access_rights', ['read'], {'raise_exception': False})
Yet i still get an exception.
Traceback (most recent call last):
File "c:\Users\testing\odoo-external\testing.py", line 16, in
print(client.check_access_rights("res.parter"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\testing\odoo-external\wrapper.py", line 27, in check_access_rights
return models.execute_kw(self.odoo_db, self.uid, self.password, model, 'check_access_rights', ['read'], {'raise_exception': False})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 1122, in call
return self.__send(self.__name, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 1464, in __request
response = self.__transport.request(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 1166, in request
return self.single_request(host, handler, request_body, verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 1182, in single_request
return self.parse_response(resp)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 1354, in parse_response
return u.close()
^^^^^^^^^
File "C:\Users\AppData\Local\Programs\Python\Python311\Lib\xmlrpc\client.py", line 668, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 2: "Object res.parter doesn't exist">