[IMP] Kanban: catch record edited in form
bzr revid: fme@openerp.com-20110912133639-ogyaxnl8ds9k4rnk
This commit is contained in:
parent
05bedcc76a
commit
14f1cbe35f
|
@ -482,7 +482,7 @@ openerp.web.FormDialog = openerp.web.Dialog.extend({
|
|||
self.form.on_record_loaded(records[0]);
|
||||
});
|
||||
},
|
||||
on_form_dialog_saved: function() {
|
||||
on_form_dialog_saved: function(r) {
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -20,6 +20,7 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
|
|||
this.qweb = new QWeb2.Engine();
|
||||
if (this.options.action_views_ids.form) {
|
||||
this.form_dialog = new openerp.web.FormDialog(this, {}, this.options.action_views_ids.form, dataset).start();
|
||||
this.form_dialog.on_form_dialog_saved.add_last(this.on_record_saved);
|
||||
}
|
||||
},
|
||||
start: function() {
|
||||
|
@ -179,6 +180,11 @@ openerp.web_kanban.KanbanView = openerp.web.View.extend({
|
|||
this.notification.warn("Kanban", "No form view defined for this object");
|
||||
}
|
||||
},
|
||||
on_record_saved: function(r) {
|
||||
var id = this.form_dialog.form.datarecord.id;
|
||||
// TODO fme: reload record instead of all. need refactoring
|
||||
this.do_actual_search();
|
||||
},
|
||||
do_change_color: function(record_id, $e) {
|
||||
var self = this,
|
||||
id = record_id,
|
||||
|
|
Loading…
Reference in New Issue