Ravi Gohil (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/6.1-opw-575791-rgo into lp:openerp-web/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-575791-rgo/+merge/110033
Hello,
When the calendar view doesn't get the value for it's fields, it shows `false`
and not the blank string.
You can reproduce the issue by defining a meeting and not setting the value for
the fields `Sales Team` or `Partner`.
This MP contains fix for this issue. Kindly review it.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-575791-rgo/+merge/110033
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/6.1-opw-575791-rgo.
=== modified file 'addons/web_calendar/static/src/js/calendar.js'
--- addons/web_calendar/static/src/js/calendar.js 2012-04-17 10:15:17 +0000
+++ addons/web_calendar/static/src/js/calendar.js 2012-06-13 11:09:18 +0000
@@ -239,17 +239,16 @@
}
},
convert_event: function(evt) {
+ var self = this;
var date_start = openerp.web.str_to_datetime(evt[this.date_start]),
date_stop = this.date_stop ? openerp.web.str_to_datetime(evt[this.date_stop]) : null,
date_delay = evt[this.date_delay] || 1.0,
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 = _(this.info_fields).chain()
+ .filter(function(fld) { return (self.fields[fld].type != 'boolean') ? !_.isBoolean(evt[fld]) && fld : fld; })
+ .map(function(fld) { return (evt[fld] instanceof Array) ? evt[fld][1] : 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