[imp] used the form open popup in m2m

bzr revid: nicolas.vanhoren@openerp.com-20110713095949-242ibznw1f0qfwet
This commit is contained in:
niv-openerp 2011-07-13 11:59:49 +02:00
parent 289ec3545b
commit 0485c630de
1 changed files with 5 additions and 9 deletions

View File

@ -1785,15 +1785,11 @@ openerp.base.form.Many2ManyListView = openerp.base.ListView.extend({
});
},
do_activate_record: function(index, id) {
this.m2m_field.view.session.action_manager.do_action({
"res_model": this.dataset.model,
"views": [[false,"form"]],
"res_id": id,
"type": "ir.actions.act_window",
"view_type": "form",
"view_mode": "form",
"target": "new",
"context": this.m2m_field.build_context()
var self = this;
var pop = new openerp.base.form.FormOpenPopup(null, this.m2m_field.view.session);
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {});
pop.on_write_completed.add_last(function() {
self.reload_content();
});
}
});