one2many field show all ids in tree view.

Bug #942894 reported by William Beltrán
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Status tracked in Trunk
6.1
Fix Released
Low
Unassigned
Trunk
Fix Released
Low
OpenERP R&D Web Team

Bug Description

In the tree view of an object i have a one2many fields, in gtk client the field is shown like (n) where n is the number of records related, but in web client it shows all the ids of the bjects related like this '1,2,3,4,5,6' and i expect '(6)' like in gtk.

ver: openerp6.1.1
ubuntu 11.10

Related branches

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Thanks william, i reproduce the same bug with:
Web at revno: 2239

Changed in openerp-web:
status: New → Confirmed
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
Changed in openerp-web:
importance: Undecided → Low
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Now you can propose to merge, i check your branch just one fix for quality about spaces, ç

count = value;

instead

count=value;

Thanks,

Revision history for this message
William Beltrán (wigebeno) wrote :

Hi, I check the code according to Xavier, i changed the code in lp:~wigebeno/openerp-web/openerp-web
and i add the same funcyion in case many2many please check if its ok to aproved the merge proporsal.

The code now seems like this:
case 'one2many':
            return _.str.sprintf(_t("(%d records)"), value.length);
case 'many2many':
     return _.str.sprintf(_t("(%d records)"), value.length);

Regards.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Merged in trunk (with a small alteration to remove redundancy between the two cases), adding it to 6.1 so I don't forget to backport it.

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Backported to 6.1 in revision <email address hidden>

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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