[imp] added edition of a task
bzr revid: nicolas.vanhoren@openerp.com-20120125123933-kabfy3d6mhrjk3a7
This commit is contained in:
parent
be8b9d9ff3
commit
647785331e
|
@ -28,6 +28,9 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({
|
||||||
},
|
},
|
||||||
do_search: function (domains, contexts, group_bys) {
|
do_search: function (domains, contexts, group_bys) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
self.last_domains = domains;
|
||||||
|
self.last_contexts = contexts;
|
||||||
|
self.last_group_bys = group_bys;
|
||||||
// select the group by
|
// select the group by
|
||||||
var n_group_bys = [];
|
var n_group_bys = [];
|
||||||
if (this.fields_view.arch.attrs.default_group_by) {
|
if (this.fields_view.arch.attrs.default_group_by) {
|
||||||
|
@ -51,6 +54,9 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
reload: function() {
|
||||||
|
return this.do_search(this.last_domains, this.last_contexts, this.last_group_bys);
|
||||||
|
},
|
||||||
on_data_loaded: function(tasks, group_bys) {
|
on_data_loaded: function(tasks, group_bys) {
|
||||||
var self = this;
|
var self = this;
|
||||||
$(".oe-gantt-view-view", this.$element).html("");
|
$(".oe-gantt-view-view", this.$element).html("");
|
||||||
|
@ -188,8 +194,17 @@ openerp.web_gantt.GanttView = openerp.web.View.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
on_task_display: function(task) {
|
on_task_display: function(task) {
|
||||||
//TODO niv
|
var self = this;
|
||||||
console.log(task);
|
var pop = new openerp.web.form.FormOpenPopup(self);
|
||||||
|
pop.on_write_completed.add_last(function() {
|
||||||
|
self.reload();
|
||||||
|
});
|
||||||
|
pop.show_element(
|
||||||
|
self.dataset.model,
|
||||||
|
task.id,
|
||||||
|
null,
|
||||||
|
{}
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue