[FIX] set dataset index to null for new event.

bzr revid: vda@tinyerp.com-20110607090935-hap62nbpb1ymys4r
This commit is contained in:
vda (OpenERP) 2011-06-07 14:39:35 +05:30
parent dc8c1b2199
commit 8c2e45a403
1 changed files with 10 additions and 3 deletions

View File

@ -120,20 +120,24 @@ openerp.base_calendar.CalendarView = openerp.base.Controller.extend({
var self = this;
scheduler.attachEvent(
"onDblClick",
function(event_id, event_object) {
function(event_id, e) {
self.popup_event(event_id);
e.stopPropagation();
e.preventDefault();
}
);
scheduler.attachEvent(
"onEventCreated",
function(event_id, event_object) {
function(event_id, e) {
//Replace default Lightbox with Popup Form of new Event
scheduler.showLightbox = function(){
//Delete Newly created Event,Later we reload Scheduler
scheduler.deleteEvent(event_id)
self.popup_event();
e.stopPropagation();
e.preventDefault();
}
}
);
@ -304,6 +308,9 @@ openerp.base_calendar.CalendarView = openerp.base.Controller.extend({
var action_manager = new openerp.base.ActionManager(this.session, element_id);
action_manager.start();
action_manager.do_action(action);
//Default_get
if(!event_id) action_manager.viewmanager.dataset.index = null;
}
});