Post by visiniaga »

  1. problem export to MSP

successfully upgrade to 2.0.5, but there is error when export to MSP
Error:
Uncaught TypeError: Cannot read properties of undefined (reading 'internalId')

webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:231391
Traceback:
TypeError: Cannot read properties of undefined (reading 'internalId')
at MspExport.getAssignmentsData (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:231391:46)
at MspExport.generateExportData (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:230999:24)
at MspExport.export (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:231028:23)
at GanttToolbar.onMSPExport (webpack:///./src/lib/GanttToolbar.js?:617:41)
at Button.callback (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:3803:70)
at Button.trigger (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:6949:40)
at Button.onInternalClick (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:55552:10)
at HTMLButtonElement.handler (webpack:///./node_modules/@bryntum/gantt/gantt.module.js?:14272:72)

  1. error when opening task
    note: its already upgrade to 2.0.5 as the setting already show selection to working calendar

Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo14/odoo/addons/base/models/ir_http.py", line 237, in dispatch
result = request.dispatch()
File "/opt/odoo/odoo14/odoo/http.py", line 685, in dispatch
result = self.call_function(**self.params)
File "/opt/odoo/odoo14/odoo/http.py", line 361, in call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo14/odoo/service/model.py", line 94, in wrapper
return f(dbname, args, **kwargs)
File "/opt/odoo/odoo14/odoo/http.py", line 349, in checked_call
result = self.endpoint(a, **kw)
File "/opt/odoo/odoo14/odoo/http.py", line 908, in call
return self.method(args, **kw)
File "/opt/odoo/odoo14/odoo/http.py", line 533, in response_wrap
response = f(args, **kw)
File "/opt/odoo/odoo14/odoo/addons/web/controllers/main.py", line 1372, in call_kw
return self.call_kw(model, method, args, kwargs)
File "/opt/odoo/odoo14/odoo/addons/web/controllers/main.py", line 1364, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo14/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo14/odoo/api.py", line 386, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo/odoo14/odoo/models.py", line 3011, in read
raise ValueError("Invalid field %r on model %r" % (name, self.name))
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo/odoo14/odoo/http.py", line 641, in handle_exception
return super(JsonRequest, self).handle_exception(exception)
File "/opt/odoo/odoo14/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
ValueError: Invalid field 'gantt_calendar' on model 'project.task'


Post by Terence »

Is this a specific project where the error occurs? Which Odoo version are you running?

And is this reproducible on https://odoo-gantt.bryntum.com?

demo/demo


Post by Terence »

I see. We removed the gantt_calendar field from project.task

gantt_calendar = fields.Selection([
        ('general', 'General'),
        ('business', 'Business'),
        ('night', 'Night shift')
    ], string="Gantt Calendar", default='general')

This field has been removed and is not used anymore in our module, that means you use it somewhere else. Not in our code

You can use instead of gantt_calendar in your code.

gantt_calendar_flex = fields.Char(string="Gantt Calendar Ids")

Can you please check where you have made modifications?


Post by visiniaga »

while calendar selected, export to MSP make chrome unresponsive,

while empty it show error in the previous post
Uncaught TypeError: Cannot read properties of undefined (reading 'internalId')


Post by Terence »

Can you look into the answer I gave above? I can not reproduce the MSP issue on my end.

Lets first look into the gantt_calendar field. Did you make modifications to the module?


Post by visiniaga »

problem opening task has been resolved, field gantt_calendar is move to page in odoo studio view,
remove that field from view, and problem is gone.

now the problem on microsoft project MSP export to xml file, it doesnt produce in this particular project
checking with other project it able to export

Attachments
export to MSP failed.png
export to MSP failed.png (1.19 MiB) Viewed 421 times

Post by Terence »

Ok, I can not reproduce it on my end. Please look into this specific project what makes it different?


Post by visiniaga »

Don't know where to look,
found there 2 project that failed to export xml
others project (many) seem fine

this also failed to export

Screenshot 2023-07-10 20.55.53.png
Screenshot 2023-07-10 20.55.53.png (163.06 KiB) Viewed 406 times

Post by Terence »

Ok. I can only debug it if I have the output of the load call of those projects.

You can grab it from the network tab in the dev console of your browser. Or give me access to your Odoo instance.

Screenshot 2023-07-10 at 18.54.59.png
Screenshot 2023-07-10 at 18.54.59.png (333.31 KiB) Viewed 395 times

Post by visiniaga »

network console also having same error

Attachments
www.visiniaga.com-1689050565529.log
(874 Bytes) Downloaded 33 times
Screenshot 2023-07-11 11.43.19.png
Screenshot 2023-07-11 11.43.19.png (1.02 MiB) Viewed 384 times

Post Reply