Jack
Jack

Reputation: 79

TypeError: list.fields[order.name] is undefined

We are currently trying to upgrade to odoo 11 (from 10). We could fix most issues of our custom modules while installing them in new odoo 11 but now i get the following runtime error:

TypeError: list.fields[order.name] is undefined
http://10.15.0.183:8069/web/content/975-35dc0a2/web.assets_backend.js:1293
Traceback:
compareRecords@http://10.15.0.183:8069/web/content/975-35dc0a2/web.assets_backend.js:1293:190

Any ideas whats wrong? Any possibility to debug this or to find out where this exactly happens? the Traceback does not tell anything and in odoo-server log there is nothing.

we have different custom moduls extending articles,customers..

Upvotes: 1

Views: 2344

Answers (2)

Chris Rob
Chris Rob

Reputation: 11

I know this question is old, but I had the same problem today.

I'm just sharing the fix in my case (Axel Mendoza "debug=assets" answer helped me to pinpoint the bug).

The problem was a mistake in a form view : a <tree> element was used to render a many2many field, and the default_order attribute was referencing a field not used inside the <tree> definition. Wrong XML :

<field name="my_many2many_field">
<tree default_order="my_field_0">
<field name="my_field_1"/>
<field name="my_field_2"/>
</tree>
</field>

In my case the fix was to add the field referenced by the default_order attribute, as an invisible field, inside the <tree> definition. Fixed XML :

<field name="my_many2many_field">
<tree default_order="my_field_0">
<field name="my_field_0" invisible="1"/>
<field name="my_field_1"/>
<field name="my_field_2"/>
</tree>
</field>

Upvotes: 1

aekis.dev
aekis.dev

Reputation: 2764

Try to unpack js files to get a better js error that will lead you exactly to where is located the issue, or at least a clear path to start debugging the JS issue in the browser. Try to reproduce the issue starting the page load from this URL

http://10.15.0.183:8069/web?debug=assets

you can also activate debugging mode from the Settings app or using a plugin for your browser:

Upvotes: 1

Related Questions