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

how create custom widget for field with old values? its created it with empty template:

js:

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

 var form_common = require('web.form_common'); 

 var core = require('web.core');
var statusWidget = form_common.AbstractField.extend({ 

 init: function (view, code) { 

 this._super(view, code); 

 }, 

 render_value: function() {
} });


 core.form_widget_registry.add('status_widget', statusWidget);});


xml:

<field name="user_id" position="after"> 

 <field name="test_selection" widget="status_widget"/> 

 </field>


아바타
취소
작성자 베스트 답변

I found file form_widgets.js in web module and extend classes from it

아바타
취소
관련 게시물 답글 화면 활동
1
5월 23
7211
0
12월 17
4024
1
7월 16
4064
1
6월 24
1234
1
6월 23
2998