Vaibhav (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-calendar-filter-events-vda into
lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-calendar-filter-events-vda/+merge/79676
Should able to Filter Events or Edit Events.
Sales > Sales > Sales Order > CalendarView > Clear All Filters.
-> Click on Any State From Sidebar(Responsible)
Throw an error `is not a valid date.`
Because Type of event date_start is remains same, but date-format is changed
to datetime.
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-calendar-filter-events-vda/+merge/79676
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-calendar-filter-events-vda.
=== modified file 'addons/web_calendar/static/src/js/calendar.js'
--- addons/web_calendar/static/src/js/calendar.js 2011-10-13 14:16:01 +0000
+++ addons/web_calendar/static/src/js/calendar.js 2011-10-18 11:41:26 +0000
@@ -19,10 +19,8 @@
this.has_been_loaded = $.Deferred();
this.creating_event_id = null;
this.dataset_events = [];
- if (this.options.action_views_ids.form) {
- this.form_dialog = new openerp.web_calendar.CalendarFormDialog(this, {}, this.options.action_views_ids.form, dataset);
- this.form_dialog.start();
- }
+ this.form_dialog = new openerp.web_calendar.CalendarFormDialog(this, {}, this.options.action_views_ids.form, dataset);
+ this.form_dialog.start();
this.COLOR_PALETTE = ['#f57900', '#cc0000', '#d400a8', '#75507b', '#3465a4', '#73d216', '#c17d11', '#edd400',
'#fcaf3e', '#ef2929', '#ff00c9', '#ad7fa8', '#729fcf', '#8ae234', '#e9b96e', '#fce94f',
'#ff8e00', '#ff0000', '#b0008c', '#9000ff', '#0078ff', '#00ff00', '#e6ff00', '#ffff00',
@@ -183,7 +181,13 @@
}
if (this.fields[this.date_start]['type'] == 'date') {
- evt[this.date_start] = openerp.web.str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss');
+ var formated_date;
+ try{
+ evt[this.date_start] = openerp.web.str_to_date(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss');
+ } catch(e) {}
+ try {
+ evt[this.date_start] = openerp.web.str_to_datetime(evt[this.date_start]).set({hour: 9}).toString('yyyy-MM-dd HH:mm:ss');
+ } catch(e) {}
}
if (this.date_stop && evt[this.date_stop] && this.fields[this.date_stop]['type'] == 'date') {
evt[this.date_stop] = openerp.web.str_to_date(evt[this.date_stop]).set({hour: 17}).toString('yyyy-MM-dd HH:mm:ss');
_______________________________________________
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