[imp] used the form open popup in m2m
bzr revid: nicolas.vanhoren@openerp.com-20110713095949-242ibznw1f0qfwet
This commit is contained in:
parent
289ec3545b
commit
0485c630de
|
@ -1785,15 +1785,11 @@ openerp.base.form.Many2ManyListView = openerp.base.ListView.extend({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
do_activate_record: function(index, id) {
|
do_activate_record: function(index, id) {
|
||||||
this.m2m_field.view.session.action_manager.do_action({
|
var self = this;
|
||||||
"res_model": this.dataset.model,
|
var pop = new openerp.base.form.FormOpenPopup(null, this.m2m_field.view.session);
|
||||||
"views": [[false,"form"]],
|
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {});
|
||||||
"res_id": id,
|
pop.on_write_completed.add_last(function() {
|
||||||
"type": "ir.actions.act_window",
|
self.reload_content();
|
||||||
"view_type": "form",
|
|
||||||
"view_mode": "form",
|
|
||||||
"target": "new",
|
|
||||||
"context": this.m2m_field.build_context()
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue