[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) { 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()
}); });
} }
}); });