diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-03-03 14:01:13 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 00a172b40d0fd7edbf7cd7190b2e9db6345e51b5 (patch) | |
| tree | 3c2f167816090362ffb8484e3e068fa76591e86b /addons/web/static/src | |
| parent | 722cb7cd83192472a10efbdd3783dd5bf61f3fdb (diff) | |
[FIX] web: adapt 1a9a082d to new fields
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 3f20d802209..b3b3a26c437 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -567,16 +567,6 @@ var FieldX2Many = AbstractRelationalField.extend({ //-------------------------------------------------------------------------- /** - * This function is meant to be overriden by the One2ManyField. - * - * @private - * @returns {Boolean} true if the 'Add an item' row should be available in - * the list renderer, false otherwise - */ - _hasCreateLine: function () { - return !this.isReadonly; - }, - /** * Instanciates or updates the adequate renderer. * * @override @@ -597,7 +587,7 @@ var FieldX2Many = AbstractRelationalField.extend({ this.renderer = new ListRenderer(this, this.value, { arch: arch, mode: this.mode, - addCreateLine: this._hasCreateLine(), + addCreateLine: !this.isReadonly && this.activeActions.create, addTrashIcon: !this.isReadonly, }); } @@ -785,16 +775,6 @@ var FieldOne2Many = FieldX2Many.extend({ //-------------------------------------------------------------------------- /** - * Overrides enable the 'Add an item' feature if the 'create' action is - * available. - * - * @override - * @private - */ - _hasCreateLine: function () { - return this._super.apply(this, arguments) && this.activeActions.create; - }, - /** * Overrides to only render the buttons if the 'create' action is available. * * @override |
