Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1055 มุมมอง

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',
]
},
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 24
1322
1
ก.ย. 23
2305
2
เม.ย. 23
4335
How to call javascript on button click แก้ไขแล้ว
2
ม.ค. 23
6844
get the model in js แก้ไขแล้ว
3
มี.ค. 25
2819