[FIX] Make matrix editable depending of the status of the parent

This commit is contained in:
mreficent
2018-05-02 14:28:12 +02:00
parent 0883edd828
commit 951e2f2fc6
2 changed files with 2 additions and 2 deletions

View File

@@ -238,7 +238,7 @@ odoo.define('web_widget_x2many_2d_matrix.X2Many2dMatrixRenderer', function (requ
if (modifiers.invisible && !(options && options.renderInvisible)) {
return $td;
}
options.mode = 'edit'; // enforce edit mode
options.mode = this.getParent().mode; // enforce mode of the parent
var widget = this._renderFieldWidget(node, record, _.pick(options, 'mode'));
this._handleAttributes(widget.$el, node);
return $td.append(widget.$el);