')
.data('name', node.attrs.name || '_default_')
- .append($headers)
- .append($pages);
+ .append($headers, $pages);
+ this._registerModifiers(node, this.state, $notebook);
+ this._handleAttributes($notebook, node);
+ return $notebook;
},
/**
* @private
diff --git a/addons/web/static/tests/views/form_tests.js b/addons/web/static/tests/views/form_tests.js
index e5efb3f9b7a..fecac794979 100644
--- a/addons/web/static/tests/views/form_tests.js
+++ b/addons/web/static/tests/views/form_tests.js
@@ -298,6 +298,33 @@ QUnit.module('Views', {
form.destroy();
});
+ QUnit.test('properly handle modifiers and attributes on notebook tags', function (assert) {
+ assert.expect(2);
+
+ var form = createView({
+ View: FormView,
+ model: 'partner',
+ data: this.data,
+ arch: '
',
+ res_id: 1,
+ });
+
+ assert.ok(form.$('.o_notebook').hasClass('o_invisible_modifier'),
+ 'the notebook should handle modifiers (invisible)');
+ assert.ok(form.$('.o_notebook').hasClass('new_class'),
+ 'the notebook should handle attributes');
+ form.destroy();
+ });
+
QUnit.test('invisible attrs on first notebook page', function (assert) {
assert.expect(6);