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

Odoo 13

How to create URL link, in form view. For example odoo.com


model:

url_field = fields.Char('URL')

view:

<field name="url_field" widget="url" readonly="1" text="odoo.com"/>


Field is shown in form view, but value not exist ;(


How make it works?


아바타
취소
베스트 답변

You need to store the value in the URL field. The stored value will then be displayed on the screen. If you want to provide a default value for the URL, you can define the field like so in the model.

url_field = fields.Char('URL', default='https://www.odoo.com')
아바타
취소
작성자

Thank You for answer. How will look field in view? I have still empty value in url_field

작성자 베스트 답변

Nevermind. It works. I needed to add "string=" as field attribute. Again, thank You for help Paresh

아바타
취소
베스트 답변

Try in XML view this:


아바타
취소
관련 게시물 답글 화면 활동
1
11월 23
2270
3
11월 24
6037
0
3월 24
1166
2
2월 23
255
0
7월 20
4151