forked from OdooDataFlow/odoo-data-flow
-
Notifications
You must be signed in to change notification settings - Fork 1
Userfriendly error message for non-exsisting model #26
Copy link
Copy link
Open
Description
Try to import to a non exsisting mdel displays an error message.
The message itself could be improved by only showing the relevant part in the panel.
Desired:
message': "Object product.attribute.line doesn't exist
Current output in full
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Odoo Connection Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Could not connect to Odoo to get model fields. Error: {'code': 200, 'message': 'Odoo Server Error', 'data': {'name': 'odoo.exceptions.UserError', 'debug': 'Traceback (most recent call last):\n File "/opt/odoo/custom/src/odoo/odoo/http.py", line 2547, in │
│ __call__\n response = request._serve_nodb()\n File "/opt/odoo/custom/src/odoo/odoo/http.py", line 2019, in _serve_nodb\n response = self.dispatcher.dispatch(rule.endpoint, args)\n File "/opt/odoo/custom/src/odoo/odoo/http.py", line 2339, in │
│ dispatch\n result = endpoint(**self.request.params)\n File "/opt/odoo/custom/src/odoo/odoo/http.py", line 754, in route_wrapper\n result = endpoint(self, *args, **params_ok)\n File "/opt/odoo/custom/src/odoo/odoo/addons/base/controllers/rpc.py", │
│ line 178, in jsonrpc\n return dispatch_rpc(service, method, args)\n File "/opt/odoo/custom/src/odoo/odoo/http.py", line 412, in dispatch_rpc\n return dispatch(method, params)\n File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 58, in │
│ dispatch\n res = execute_kw(db, uid, *params[3:])\n File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 81, in execute_kw\n return execute(db, uid, obj, method, *args, **kw or {})\n File "/opt/odoo/custom/src/odoo/odoo/service/model.py", │
│ line 87, in execute\n res = execute_cr(cr, uid, obj, method, *args, **kw)\n File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 70, in execute_cr\n raise UserError(env._("Object %s doesn\'t exist", obj))\nodoo.exceptions.UserError: Object │
│ product.attribute.line doesn\'t exist\n', 'message': "Object product.attribute.line doesn't exist", 'arguments': ["Object product.attribute.line doesn't exist"], 'context': {}}} │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels