diff options
| author | Christophe Simonis <chs@odoo.com> | 2014-06-05 13:46:53 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2014-06-05 13:46:53 +0200 |
| commit | ab9ac783db123fbcd5ef12cf232711a64a9aa97b (patch) | |
| tree | ffd7868a2f37fa204af6c5fe2497fb5135c9aa33 /addons/web/static/src | |
| parent | 426993e06d0b4806c6bad5d35a8daabf894feeab (diff) | |
[FIX] web: many2many field handle "no_create" option
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 3 | ||||
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index ce4246708b4..e9f195b892a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4360,7 +4360,8 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in pop.select_element( this.model, { - title: _t("Add: ") + this.m2m_field.string + title: _t("Add: ") + this.m2m_field.string, + no_create: this.m2m_field.options.no_create, }, new instance.web.CompoundDomain(this.m2m_field.build_domain(), ["!", ["id", "in", this.m2m_field.dataset.ids]]), this.m2m_field.build_context() diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 10840087acc..3fc40128cf6 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1402,8 +1402,9 @@ <t t-if="! widget.options.disable_multiple_selection"> <button type="button" class="oe_button oe_selectcreatepopup-search-select oe_highlight" disabled="disabled">Select</button> </t> + <t t-if="!widget.options.no_create"> <button type="button" class="oe_button oe_selectcreatepopup-search-create">Create</button> - or <a class="oe_button oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a> + or </t><a class="oe_button oe_selectcreatepopup-search-close oe_bold oe_form_button_cancel" href="javascript:void(0)">Cancel</a> </t> <t t-name="AbstractFormPopup.buttons"> <t t-if="! readonly"> |
