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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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:
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 23
|
1745 | ||
|
3
Nov 24
|
5148 | ||
|
0
Mar 24
|
664 | ||
|
2
Feb 23
|
255 | ||
|
0
Jul 20
|
3706 |