Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

I'm unable to extend the FieldRadio widget and seeing 'missing widget:....'.  The widget has been registered so why do I continue to see this ?


I can see that radio_reduce_selection has been registered from the output of the console.log statements.


Thank you .......


form_widget.js

odoo.define('customs.radio_reduce_selection', function(require) {
"use strict";

var registry = require('web.field_registry');
console.log(registry);
var relational_fields = require('web.relational_fields');
console.log (relational_fields);

var ReducedRadio = relational_fields.FieldRadio.extend({
init: function() {
console.log('Hi Bye ZZ');
this._super.apply(this, arguments);
let decrement = 0;
let value_copies = this.values? [...this.values]: [];

for (let index = 0; index if (value_copies[index].includes('export_contact')) {
this.values.splice(index - decrement, 1);
decrement++;
}
}
},
});

registry.add('radio_reduce_selection', ReducedRadio);

// return ReducedSelection;
});

res_partner.xml snippet

           

               

           



Manifest snippet

'assets': {
'web.assets_backend': [
'customs/static/src/js/form_widgets.js',
]
},
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
apr. 24
1323
1
sep. 23
2309
2
apr. 23
4337
2
jan. 23
6858
3
mar. 25
2832