Hi,
Im trying to extend charfield, but im getting the following error:
The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:
- @web/views/fields/char/char_field
The following modules could not be loaded because they have unmet dependencies, this is a secondary error which is likely caused by one of the above problems:
- @my_module/js/masked_char_field
This is how im trying:
my_module/static/src/js/masked_char_field.js
/** @odoo-module **/
import { registry } from "@web/core/registry";
import { CharField } from "@web/views/fields/char/char_field";
class MaskedCharField extends CharField {
setup() {
super.setup();
console.log("Char field inherited");
}
}
MaskedCharField.supportedTypes = ['char'];
registry.category("fields").add("masked_char_field", MaskedCharField)
__manifest__.py
{
'name': "my_module",
'summary': "short",
'description': "long",
'author': "Me",
'website': "",
'category': 'Localization/Tools',
'version': '0.1',
'depends': ['base', 'web'],
'data': [],
'demo': [],
'assets': {
'web.assets_frontend': [
'my_module/static/src/js/masked_char_field.js'
],
},
'license': 'Other proprietary'
}
what im doing wrong?