Skip to content

Commit

Permalink
[IMP] web: Many2one consider can_create to show/hide create button, c…
Browse files Browse the repository at this point in the history
…urrently only no_create options is considered to show/hide create button inside Select Create popup of many2one
  • Loading branch information
msh-odoo committed Jun 20, 2018
1 parent 059ac55 commit c109e61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/web/static/src/js/fields/relational_fields.js
Expand Up @@ -464,6 +464,7 @@ var FieldMany2One = AbstractField.extend({
res_model: this.field.relation,
domain: this.record.getDomain({fieldName: this.name}),
context: _.extend({}, this.record.getContext(this.recordParams), context || {}),
no_create: !this.can_create || !this.activeActions.create,
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
initial_ids: ids ? _.map(ids, function (x) { return x[0]; }) : undefined,
initial_view: view,
Expand Down

0 comments on commit c109e61

Please sign in to comment.