[FIX] web_editor: fix missing setDirty prop
Commit [1] removed the protection around the call to setDirty because setDirty is always defined when the field is initialized through the standard field.js mechanism. However, in todo_list.js in hr_payroll, the html field is called without going through that mechanism, resulting in the prop being missing and the call to fail with a traceback. This could be fixed by adding the missing prop to todo_list.js, but other people are likely to do the same mistake in the future so adding a default of our own is probably better to avoid future similar bugs. [1]: https://github.com/odoo/odoo/commit/f56e3bca2456f04616982a9a0e77b8d4c5a0abff closes odoo/odoo#112994 X-original-commit: a6043b3aa290d6cecaabc02995e490f44cbd6ce2 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -600,7 +600,10 @@ HtmlField.components = {
|
||||
TranslationButton,
|
||||
HtmlFieldWysiwygAdapterComponent,
|
||||
};
|
||||
HtmlField.defaultProps = {dynamicPlaceholder: false};
|
||||
HtmlField.defaultProps = {
|
||||
dynamicPlaceholder: false,
|
||||
setDirty: () => {},
|
||||
};
|
||||
HtmlField.props = {
|
||||
...standardFieldProps,
|
||||
isTranslatable: { type: Boolean, optional: true },
|
||||
|
||||
Reference in New Issue
Block a user