[IMP] added option "no_open" in m2o
bzr revid: nicolas.vanhoren@openerp.com-20120725123543-fzzefu57lwy5xksd
This commit is contained in:
parent
ac580aeae0
commit
175d5ff509
|
@ -2818,10 +2818,11 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
|
|||
if (follow)
|
||||
link += "<br />";
|
||||
}
|
||||
this.$element.find('a')
|
||||
var $link = this.$element.find('.oe_form_uri')
|
||||
.unbind('click')
|
||||
.html(link)
|
||||
.click(function () {
|
||||
.html(link);
|
||||
if (! this.get_definition_options().no_open)
|
||||
$link.click(function () {
|
||||
self.do_action({
|
||||
type: 'ir.actions.act_window',
|
||||
res_model: self.field.relation,
|
||||
|
|
|
@ -955,11 +955,13 @@
|
|||
<t t-name="FieldMany2One">
|
||||
<span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
|
||||
<t t-if="widget.get('effective_readonly')">
|
||||
<a href="#" class="oe_form_uri"/>
|
||||
<a t-if="! widget.get_definition_options().no_open" href="#" class="oe_form_uri"/>
|
||||
<span t-if="widget.get_definition_options().no_open" href="#" class="oe_form_uri"/>
|
||||
<span class="oe_form_m2o_follow"/>
|
||||
</t>
|
||||
<t t-if="!widget.get('effective_readonly')">
|
||||
<a href="#" tabindex="-1" class="oe_m2o_cm_button oe_e oe_right">/</a>
|
||||
<a t-if="! widget.get_definition_options().no_open" href="#" tabindex="-1"
|
||||
class="oe_m2o_cm_button oe_e oe_right">/</a>
|
||||
<div>
|
||||
<input type="text"
|
||||
t-att-id="widget.id_for_label"
|
||||
|
|
Loading…
Reference in New Issue