[FIX] website_form: add missing call to _super in snippet options
closes odoo/odoo#40200 X-original-commit: 424dfc913b2259862e6e6d7838844dfefd72a15c Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -66,6 +66,7 @@ odoo.define('website_form_editor', function (require) {
|
||||
start: function () {
|
||||
this.$target.addClass('o_fake_not_editable').attr('contentEditable', false);
|
||||
this.$target.find('label:not(:has(span)), label span').addClass('o_fake_editable').attr('contentEditable', true);
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
// Return the fields promise if we already issued a model
|
||||
@@ -525,6 +526,7 @@ odoo.define('website_form_editor', function (require) {
|
||||
});
|
||||
select.after(this.editable_select);
|
||||
}
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
cleanForSave: function () {
|
||||
@@ -610,6 +612,7 @@ odoo.define('website_form_editor', function (require) {
|
||||
options.registry['website_form_editor_field_model'] = disable_overlay_button_option.extend({
|
||||
start: function () {
|
||||
this.disable_button('clone', 'You can\'t duplicate a model field.');
|
||||
return this._super.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -617,6 +620,7 @@ odoo.define('website_form_editor', function (require) {
|
||||
options.registry['website_form_editor_field_required'] = disable_overlay_button_option.extend({
|
||||
start: function () {
|
||||
this.disable_button('remove', 'You can\'t remove a field that is required by the model itself.');
|
||||
return this._super.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -624,6 +628,7 @@ odoo.define('website_form_editor', function (require) {
|
||||
options.registry['website_form_editor_field_x2many'] =disable_overlay_button_option.extend({
|
||||
start: function () {
|
||||
this.disable_button('clone', 'You can\'t duplicate an item which refers to an actual record.');
|
||||
return this._super.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user