Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-577921-msh 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-577921-msh/+merge/119315

Hello,

Fixed the issue of event on calendar view which shows false for the field which 
doesn't have value, if we have shown some field on calendar view and that field 
doesn't have value, so for that field false is shown on calendar event, which 
is usability issue.

Hence filtered those field which contains false as a value.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-577921-msh/+merge/119315
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-577921-msh.
=== modified file 'addons/web_calendar/static/src/js/calendar.js'
--- addons/web_calendar/static/src/js/calendar.js	2012-06-29 10:35:12 +0000
+++ addons/web_calendar/static/src/js/calendar.js	2012-08-13 09:18:19 +0000
@@ -287,11 +287,15 @@
             res_text = '';
 
         if (this.info_fields) {
-            res_text = _.map(this.info_fields, function(fld) {
-                if(evt[fld] instanceof Array)
-                    return evt[fld][1];
-                return evt[fld];
-            });
+            res_text = _.chain(this.info_fields)
+                    .filter(function(fld){
+                        return evt[fld] !== false;
+                    }) 
+                    .map(function(fld) {
+                        if(evt[fld] instanceof Array)
+                            return evt[fld][1];
+                        return evt[fld];
+                    }).value();
         }
         if (!date_stop && date_delay) {
             date_stop = date_start.clone().addHours(date_delay);

_______________________________________________
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