콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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
2201
1
9월 23
3205
2
4월 23
5368
2
1월 23
7859
get the model in js 해결 완료
3
3월 25
3778