Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3 Răspunsuri
20294 Vizualizări

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?


Imagine profil
Abandonează
Cel mai bun răspuns

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')
Imagine profil
Abandonează
Autor

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

Autor Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

Try in XML view this:


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 23
2308
3
nov. 24
6113
0
mar. 24
1199
2
feb. 23
255
0
iul. 20
4202