[FIX] website: allow editing empty non-arch fields
987fc1190a had added a rule that made
empty fields non-editable so that a snippetless website would not be
editable. This makes empty t-fields non-editable as well which is - to
say the least - not welcome.
This commit fixes that problem by making the rule more restrictive: what
we don't want to be able to edit are empty _arch_ field specifically.
closes odoo/odoo#71718
X-original-commit: 6886c2a2a2ad47d1150dd072888c39ccfb59b163
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -305,7 +305,7 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
},
|
||||
|
||||
_getContentEditableAreas () {
|
||||
return $(this.savableSelector).not('input, [data-oe-readonly],[data-oe-type="monetary"],[data-oe-many2one-id], :empty').filter((_, el) => {
|
||||
return $(this.savableSelector).not('input, [data-oe-readonly],[data-oe-type="monetary"],[data-oe-many2one-id], [data-oe-field="arch"]:empty').filter((_, el) => {
|
||||
return !$(el).closest('.o_not_editable').length;
|
||||
}).toArray();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user