Bhumi Thakkar (Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-577371-bth into lp:openerp-web/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577371-bth/+merge/117572

Hello,

     Open project dashboard and click on "Graph" view GOT ERROR:

1. Project => Reporting => Dashboard => Project Dashboard
2. Click on graph of My Project's Planning

Observed: 'Uncaught Error: QWeb2 - template['ListView.rows']: Runtime Error: 
Error: QWeb2 - template['ListView.row']: Runtime Error: Error: [_.sprintf] 
expecting number but found array'
Expected: Listview should display.

Value is array so have to assign first index value of array into value. If 
array is empty then value is 0.0.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577371-bth/+merge/117572
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-577371-bth.
=== modified file 'addons/web/static/src/js/formats.js'
--- addons/web/static/src/js/formats.js	2012-07-03 14:02:51 +0000
+++ addons/web/static/src/js/formats.js	2012-08-01 06:31:18 +0000
@@ -118,6 +118,10 @@
             return openerp.web.insert_thousand_seps(
                 _.str.sprintf('%d', value));
         case 'float':
+            if(_.isArray(value)) {
+                if(value[0])value = value[0];
+                else value = 0.0;
+            }
             var precision = descriptor.digits ? descriptor.digits[1] : 2;
             var formatted = _.str.sprintf('%.' + precision + 'f', value).split('.');
             formatted[0] = openerp.web.insert_thousand_seps(formatted[0]);

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to