We've recently integrated the bryntum Gantt extension into our odoo database. There seems to be no issue on the dev who integrated it into our database but for other users the following "odoo client error" occurs:
Yes, we have, in addition to the Bryntum Gantt view, two additionnal views developped by Odoo (see attachments).
The Bryntum Gantt was installed as-is, and this didn't seem to cause any issues for the person who implemented it. All other users have the loading issue.
I can't seem to reproduce the error as it seems to be linked with our data. The Gantt view can be opened in our Odoo db but the projects aren't retreivable in the gantt view (I just get the same error message).
It looks like you forgot to add the attachments of the additional views.
But this already gives me a way forward for you to see if you can make the Gantt work. Because, at the moment, what I can deduce is that one or both of those other modules might interfere with the Gantt's ability to load at some point.
Please create a fresh instance with Odoo installed and the only other 3rd party module Gantt View Pro, and see if the load error still occurs. The outcome should be that it shouldn't. If this is true, add the other 2 modules one by one and check with each after adding if the load error starts occurring. When it shows up, you know which other module is causing the problem and you can go from there to fix it so everyone can get to the Gantt without errors.
We checked the Gantt view in a new branch without the third party modules and we still have the same issue : Error:
UncaughtPromiseError > vw
Uncaught Promise > Load failed
Thanks for the information, but sadly this didn't help us determine the cause.
Could you, instead, open the developer tools of your web browser, go to Network, load, and then Response. Please send us all the content that is in Response. I've attached a screenshot that shows where you need to be.
Attachments
Network - load - response.png (155.63 KiB) Viewed 321 times
We've figured out that it was due to our mutli-company use of Odoo. As the other users don't have access to the other company's data, the information wouldn't load.
I got the following from the Network/load as you suggested but in our production db:
"jsonrpc": "2.0",
"id": 351254732720,
"error": {
"code": 200,
"message": "Odoo Server Error",
"data": {
"name": "odoo.exceptions.AccessError",
"debug": "Traceback (most recent call last):\n File \"/home/odoo/src/odoo/odoo/http.py\", line 1783, in _serve_db\n return service_model.retrying(self._serve_ir_http, self.env)\n File \"/home/odoo/src/odoo/odoo/service/model.py\", line 133, in retrying\n result = func()\n File \"/home/odoo/src/odoo/odoo/http.py\", line 1810, in _serve_ir_http\n response = self.dispatcher.dispatch(rule.endpoint, args)\n File \"/home/odoo/src/odoo/odoo/http.py\", line 2014, in dispatch\n result = self.request.registry['ir.http']._dispatch(endpoint)\n File \"/home/odoo/src/odoo/addons/website/models/ir_http.py\", line 235, in _dispatch\n response = super()._dispatch(endpoint)\n File \"/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py\", line 221, in _dispatch\n result = endpoint(**request.params)\n File \"/home/odoo/src/odoo/odoo/http.py\", line 757, in route_wrapper\n result = endpoint(self, *args, **params_ok)\n File \"/home/odoo/src/user/bryntum_gantt_enterprise/controllers/controllers.py\", line 200, in bryntum_gantt_load\n calendars = all_projects.get_calendars()\n File \"/home/odoo/src/user/bryntum_gantt_enterprise/models/project_project.py\", line 69, in get_calendars\n calendars_objs = [\n File \"/home/odoo/src/user/bryntum_gantt_enterprise/models/project_project.py\", line 90, in <listcomp>\n \"leave_intervals\": [\n File \"/home/odoo/src/user/bryntum_gantt_enterprise/models/project_project.py\", line 95, in <listcomp>\n \"resource_name\": interval.resource_id.name,\n File \"/home/odoo/src/odoo/odoo/fields.py\", line 1182, in __get__\n recs._fetch_field(self)\n File \"/home/odoo/src/odoo/odoo/models.py\", line 3815, in _fetch_field\n self.fetch(fnames)\n File \"/home/odoo/src/odoo/odoo/models.py\", line 3871, in fetch\n raise self.env['ir.rule']._make_access_error('read', forbidden)\nodoo.exceptions.AccessError: Uh-oh! Looks like you have stumbled upon some top-secret records.\n\nSorry, Sophie Christian-Woodruff (id=199) doesn't have 'read' access to:\n- Resources, Antoine David (resource.resource: 138)\n\nBlame the following rules:\n- resource.resource multi-company\n\nNote: this might be a multi-company issue. Switching company may help - in Odoo, not in real life!\n\nIf you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.\n",
"message": "Uh-oh! Looks like you have stumbled upon some top-secret records.\n\nSorry, Sophie Christian-Woodruff (id=199) doesn't have 'read' access to:\n- Resources, Antoine David (resource.resource: 138)\n\nBlame the following rules:\n- resource.resource multi-company\n\nNote: this might be a multi-company issue. Switching company may help - in Odoo, not in real life!\n\nIf you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies.",
"arguments": [
"Uh-oh! Looks like you have stumbled upon some top-secret records.\n\nSorry, Sophie Christian-Woodruff (id=199) doesn't have 'read' access to:\n- Resources, Antoine David (resource.resource: 138)\n\nBlame the following rules:\n- resource.resource multi-company\n\nNote: this might be a multi-company issue. Switching company may help - in Odoo, not in real life!\n\nIf you really, really need access, perhaps you can win over your friendly administrator with a batch of freshly baked cookies."
], "context": {}
I was given acess so it now works on my end However, how can we load the project data but limite the access, as we don't want all the users to see the other company's project information.
Currently, this is not an option. I've created a task for this and we'll look into it. It might take a bit as we have a pretty full kanban of tasks that are ahead in the pipeline. I'll keep you posted.