Create a Link Button to External URL

I have a record called URL, and I want to be able to click on the URL so I can open the URL in a new browser tab.. is this possible? any reference?

Bromo

Yes, you can use the url widget. On your view just use:

<field name=”detail” widget=”url”>

You have some example in the party.contact_mecahim model of the party module.

1 Like

Hi @pokoli where is a link for the list of widgets?
I wonder if you also has widget for: mailto: and whatsapp hehehe

Bromo

Tag: thereifixedit :sweat_smile:

dot ~/project/tryton$ egrep -roh ‘widget="[a-z0-9]“’ modules/|sed 's/.widget="([a-z0-9_])”./\1/’|sort|uniq
binary
callto
date
document
email
html
image
many2many
multiselection
one2many
password
progressbar
pyson
selection
sip
time
url

mailto: and whatsapp can be solved with the url widget, then the system will decide how to open them.

Like Sergi said, take a look at contact mechanisms, there you can find examples for e-mail using url widget.

Also whatsapp should be solved with a web link, also using url widget.

1 Like

Amazing.. thanks a lot @dotbit really appreciated :blush:

Bromo

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.