diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-12 18:18:05 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-12 18:18:05 +0200 |
| commit | 6ceecffcad6bd0c8c2d73f44e8d6fdb4e520990b (patch) | |
| tree | 0882ca6662dcfd1ca5abd51fbf68b365891d3faa /addons/web/static/src/js | |
| parent | 1d7260cbcbf3af07c041f1b065f9a4139a724ca7 (diff) | |
| parent | d9d455bea3bd67059ebae043e723a219b4c350c9 (diff) | |
[MERGE] forward port branch 9.0 up to d9d455bea3b
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/form_view.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form_view.js b/addons/web/static/src/js/views/form_view.js index 7daed3d945d..4ed0a0931be 100644 --- a/addons/web/static/src/js/views/form_view.js +++ b/addons/web/static/src/js/views/form_view.js @@ -166,9 +166,10 @@ var FormView = View.extend(common.FieldManagerMixin, { if (this.fields_view.toolbar) { this.sidebar.add_toolbar(this.fields_view.toolbar); } + var canDuplicate = this.is_action_enabled('create') && this.is_action_enabled('duplicate'); this.sidebar.add_items('other', _.compact([ this.is_action_enabled('delete') && { label: _t('Delete'), callback: this.on_button_delete }, - this.is_action_enabled('create') && { label: _t('Duplicate'), callback: this.on_button_duplicate } + canDuplicate && { label: _t('Duplicate'), callback: this.on_button_duplicate } ])); this.sidebar.appendTo($node); |
