Skip to Content
This question has been flagged
1 Reply
300 Views

Hello,

I have issue with latest PLM module from  OmniaSolutions which is running on community version v16.
Issue occurs when I'm trying to link more than one part to document, this issue is not visible while using phone where linked parts are shown in kanban view.

I already wrote to dev but after month there is no response. Bellow You can find logs shown by ODOO.

TypeError: Cannot read properties of undefined (reading 'type')
    at compareRecords (http://192.168.1.3:8078/web/assets/debug/web.assets_backend.js:98774:45) (/web/static/src/legacy/js/views/basic/basic_model.js:5378)
    at stableCompare (http://192.168.1.3:8078/web/assets/debug/web.assets_common.js:76184:25) (/web/static/src/legacy/js/core/utils.js:912)
    at Array.sort ()
    at Object.stableSort (http://192.168.1.3:8078/web/assets/debug/web.assets_common.js:76183:22) (/web/static/src/legacy/js/core/utils.js:911)
    at Class._sortList (http://192.168.1.3:8078/web/assets/debug/web.assets_backend.js:98786:19) (/web/static/src/legacy/js/views/basic/basic_model.js:5390)
    at Class._fetchX2ManyBatched (http://192.168.1.3:8078/web/assets/debug/web.assets_backend.js:96511:14) (/web/static/src/legacy/js/views/basic/basic_model.js:3115)
    at Class._fetchX2ManysBatched (http://192.168.1.3:8078/web/assets/debug/web.assets_backend.js:96599:32) (/web/static/src/legacy/js/views/basic/basic_model.js:3203)
    at http://192.168.1.3:8078/web/assets/debug/web.assets_backend.js:95517:34 (/web/static/src/legacy/js/views/basic/basic_model.js:2121)
    at async Promise.all (index 0)
    at async Promise.all (index 0)

Thanks in advance.

Avatar
Discard
Best Answer

The issue you're encountering with the latest PLM module from OmniaSolutions, running on Odoo's community version 16, appears to be related to a JavaScript error that occurs when trying to link more than one part to a document. The error message, `TypeError: Cannot read properties of undefined (reading 'type')`, indicates that the code is attempting to access the `type` property of an undefined object, which typically suggests that some expected data is missing or incorrectly referenced. Since this issue does not occur when using a mobile device where linked parts are displayed in a kanban view, it suggests that the problem might be related to how the desktop view is handling these parts.


To resolve this issue, you might start by ensuring that you have the latest version of the PLM module installed, as there could be bug fixes or updates that address this specific problem. Additionally, clearing your browser cache and rebuilding Odoo's assets might help, as sometimes cached JavaScript files can cause unexpected behavior. If there are any customizations or third-party modules interacting with the PLM module, temporarily disabling them could help identify whether they are contributing to the issue.


If you're comfortable with JavaScript, debugging the code where the error occurs might shed light on why the `type` property is undefined. You could also consider using the mobile or kanban view as a temporary workaround until a permanent solution is found. Since you've already reached out to the developers without a response, escalating the issue to the Odoo community or forums might be beneficial, as other users or developers may have encountered and resolved similar problems on 1win app org. If all else fails, modifying the relevant JavaScript file to add checks for undefined objects before accessing their properties could serve as a temporary fix, though this should be done cautiously and ideally with version control in place.

Avatar
Discard
Related Posts Replies Views Activity
2
May 23
1448
1
Apr 23
1689
1
Jan 23
3370
0
Jun 21
1215
1
Jan 21
14659