コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1637 ビュー

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',
]
},
アバター
破棄
関連投稿 返信 ビュー 活動
1
4月 24
2003
1
9月 23
3041
2
4月 23
5170
2
1月 23
7692
3
3月 25
3615