many2many_tags performance problem due to series of name_get call

Bug #1265274 reported by Mohammed Shekha(Open ERP)
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Hello,

I faced the issue with many2many_tags widget, there is issue of performance due to series of name_get calls, when there is a many2many_tags widget in list view.

Steps to produce: Create a 80 to 90 records in a listview where there is a many2many_tags widget available, say for example take a Sale Order Line create 80 to 90 records for Sale Order Line, after creation just open or edit that Sale Order record you will notice many2many_tags takes time to load, you will also see record is loading...

The reason is simply design of many2many_tags, many2many field calls name_get for each record of sale order line, so if there are 80 records in list then 80 name_get calls goes to fetch name for many2many_tags and it creates performance issue.

For now I do not have any solution suggestion from web-client because when we edit or Save the record record is reloaded by design, I am not sure but it should be fixed from server same as many2one sends return value in format (id, value), we should return value for many2many field in format [(id, value), (ids, value)...], I am not sure this is the only way but I think this way name_get will not be needed anymore after this, we also need to change the many2many and many2many_tags widget to deal with such values.

Thanks.

affects: openobject-addons → openerp-web
Revision history for this message
Florent THOMAS (mailinglist) wrote :
Revision history for this message
Mohammad Alhashash (alhashash) wrote :

The same issue applies for 'reference' fields. The client calls name_get for each record.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.