İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
20242 Görünümler

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?


Avatar
Vazgeç
En İyi Yanıt

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')
Avatar
Vazgeç
Üretici

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

Üretici En İyi Yanıt

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

Avatar
Vazgeç
En İyi Yanıt

Try in XML view this:


Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Kas 23
2282
3
Kas 24
6057
0
Mar 24
1170
2
Şub 23
255
0
Tem 20
4167