Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Gastenverblijf
    • Drankenhandelaar
    • Hotel
    Vastgoed
    • Makelaarskantoor
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accountantskantoor
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textiel
    • Metaal
    • Meubels
    • Eten
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Zonne-energiesystemen
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC-diensten
    Andere
    • Non-profitorganisatie
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

text field value to Link in message to redirect to form

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
odoo16featuresv17
1 Beantwoorden
4586 Weergaven
Avatar
SmithJohn45

i have below code to send message in Automated Action and want to convert into link to open corresponding form view:

record.message_post(body="Internal Transfer created successfully... "+str(record.x_stock_picking_id)+' '+new_stock_picking.name)

it is working correctly to show the stock.picking id and name both. how i can convert new_stock_picking.name into a Link to open Internal Transfer form view with record.x_stock_picking_id (many2one) which contains value of stock.picking id field.

please help.

note: my previous topic has been Deleted without information " why and what was the wrong  " so i cannot repeat the mistake. i am struggling to achieve something and as per my knowledge, i can made mistakes too, so please be humble and inform us.

regards



0
Avatar
Annuleer
SmithJohn45
Auteur

i tried as below, it is generating related link but it appears as text how i can convert this into actual clickable link?

record.message_post(body=f'{base_url}/web#id={record.x_stock_picking_id.id}&view_type=form&model=stock.picking')

regards

Avatar
Maciej Burzymowski
Beste antwoord

The URL of a form view in Odoo typically follows this format: https:///web#id=&model=&view_type=form. You can replace , , and with your Odoo instance’s URL, the ID of the record you want to open, and the name of the model, respectively.


Here’s how you can modify your code to include a link to the form view of the new_stock_picking record:


https://pastebin.com/xVs2sk6r


In this code, replace with the URL of your Odoo instance. This code creates a link with the text of new_stock_picking.name that opens the form view of the new_stock_picking record when clicked.

Please note that this code assumes that the user who clicks the link has the necessary access rights to view the new_stock_picking record. If the user does not have the necessary access rights, they will see an access error when they click the link.

1
Avatar
Annuleer
SmithJohn45
Auteur

thank you for reply but i have to enter my odoo instance which is localhost? how i can make it dynamic so it can be access from any instance which make sense.

regards

SmithJohn45
Auteur

also tried your given code but its showing in Text not as clickable Link ... what i am missing or doing wrong?

using my code i can copy / paste the link text and can access the currently created new record in Internal Transfer form view.

please help.

regards

SmithJohn45
Auteur

thank you @Maciej Burzymowski for your help.

i have implemented Smart Button because after all struggle i just have text of generated link but not a clickable link.

kind regards

SmithJohn45
Auteur

problem has resolved, found solution for link when asked on stackoverflow. now the Clickable Link appear in chatter message ... many thanks to CZoellner who help as it should be.

@Admin please, now you can close this topic.

regards.

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
odoo 16 & odoo 17: change default message?
odoo16features v17
Avatar
Avatar
1
apr. 25
3856
Payroll UK
odoo16features v17
Avatar
Avatar
1
mrt. 25
3247
Twilio Voip with odoo 16
odoo16features v17
Avatar
Avatar
Avatar
Avatar
Avatar
4
aug. 24
4758
Created incorrect Record Rule and cannot access Odoo Opgelost
odoo16features v17
Avatar
Avatar
1
jan. 24
2462
Override create method from specific form view
odoo16features v17
Avatar
Avatar
1
dec. 23
3673
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now