[FIX] web_editor: remove dead code in html_field

The template `web_editor.assets_edit_html_field` was not used nor
required anymore. The files under that bundle were already included
in the backend.

The template under the key `cssEditAssetId` in html_field.js is in fact
loaded in wysiwyg_iframe.js through the option iframeCssAssets.

Moreover, the line `await getBundle` was doing nothing meaningful as
the bundle assets would not be loaded after being fetched.

task-3446819

closes odoo/odoo#131365

X-original-commit: 4eebfcbdf5428cd1c53bafcd89da7095964ff384
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Nicolas Bayet
2023-08-10 09:11:55 +02:00
committed by David Monjoie
parent 7d58a634da
commit 592ca1f02e
@@ -46,7 +46,6 @@ export class HtmlField extends Component {
dynamicPlaceholder: { type: Boolean, optional: true, default: false },
dynamicPlaceholderModelReferenceField: { type: String, optional: true },
cssReadonlyAssetId: { type: String, optional: true },
cssEditAssetId: { type: String, optional: true },
isInlineStyle: { type: Boolean, optional: true },
sandboxedPreview: {type: Boolean, optional: true},
wrapper: { type: String, optional: true },
@@ -91,9 +90,6 @@ export class HtmlField extends Component {
if (this.props.cssReadonlyAssetId) {
this.cssReadonlyAsset = await getBundle(this.props.cssReadonlyAssetId);
}
if (this.props.cssEditAssetId || this.props.isInlineStyle) {
await getBundle(this.props.cssEditAssetId || 'web_editor.assets_edit_html_field');
}
});
this._lastRecordInfo = {
res_model: this.props.record.resModel,
@@ -706,7 +702,6 @@ export const htmlField = {
cssReadonlyAssetId: options.cssReadonly,
dynamicPlaceholder: options?.dynamic_placeholder || false,
dynamicPlaceholderModelReferenceField: options?.dynamic_placeholder_model_reference_field || "",
cssEditAssetId: options.cssEdit,
isInlineStyle: options['style-inline'],
wysiwygOptions,