[FIX] web_editor: translatable html fields

Before this commit, clicking on the translate button of a web_editor
html field throw an error.

closes odoo/odoo#101551

X-original-commit: c5199c8e21abd90e2904e31240e427fa2e920803
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
FrancoisGe
2022-09-29 12:17:14 +02:00
parent 7fbc49d486
commit 43908c5fcd
2 changed files with 6 additions and 4 deletions
@@ -78,3 +78,8 @@ export class TranslationButton extends Component {
}
}
TranslationButton.template = "web.TranslationButton";
TranslationButton.props = {
fieldName: { type: String },
record: { type: Object },
updateField: { type: Function },
};
@@ -29,11 +29,8 @@
<span t-attf-style="font-size: 15px; position: absolute; right: {{this.props.codeview ? '40px' : '5px'}}; top: 5px;">
<TranslationButton
fieldName="props.name"
resId="props.record.resId"
resModel="props.record.resModel"
value="props.value"
record="props.record"
updateField="props.update"
context="props.record.context"
/>
</span>
</t>