Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1702 Zobrazení

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 24
2136
1
zář 23
3143
2
dub 23
5316
2
led 23
7791
3
bře 25
3718