Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

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

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How to display field as hyperlink

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
viewfieldhyperlink
3 Réponses
50849 Vues
Avatar
Anuradha
    How can i display field as hyper link in my view?In my code i added widget="url" but its not showng as link.Please help

    <?xml version="1.0" encoding="utf-8" ?>
    <openerp>
        <data>
            <record id="voip_form_view" model="ir.ui.view">
                <field name="name">Voip Details</field>
                <field name="model">filedata</field>
                <field name="arch" type="xml">
                    <form string="voip" version="7.0">
                <!--       <style> .openerp .oe_view_manager table.oe_view_manager_header { display:none } </style> -->
                       <style>.openerp .oe_application .oe_breadcrumb_title  {display:none }</style>

                        <style>.openerp .oe_view_manager table.oe_view_manager_header .oe_view_manager_buttons{display:none }</style>

        <!--                <header style="padding-left: 5px; padding-top: 60px; padding-bottom: 10px;"> -->
              <!--        <header> -->
                            <button name="get_filenames" type="object" string="List Files" />
                  <!--       </header> -->
    <!--
                        <sheet>
                        </sheet> -->
                    </form>
                </field>
            </record>

            <record id="voip_filter" model="ir.ui.view">
                <field name="name">filedata.select</field>
                <field name="model">filedata</field>
                <field name="arch" type="xml">
                    <search string="File Details">
                        <field name="file_name" string="Name"/>
                        <field name="time_created" string="Time Created"/>
                        <field name="size" string="Size"/>
                        <group expand="0" string="Group By...">
                            <filter string="Name" name="name" icon="terp-personal" domain="[]" context="{'group_by':'file_name'}"/>
                            <filter string="Time Created" icon="terp-personal" domain="[]" context="{'group_by':'time_created'}"/>
                            <filter string="Size" icon="terp-personal" domain="[]" context="{'group_by':'size'}"/>
                        </group>
                    </search>
                </field>
            </record>
     <record id="voipdata_tree_view" model="ir.ui.view">
            <field name="name">File Details</field>
            <field name="model">filedata</field>
            <field name="priority" eval="1"/>
            <field name="type">tree</field>
            <field name="arch" type="xml">
            <tree string="File Names" >
                <field name="file_name" widget='url'/>
                <field name="file_path" widget='url'/>

                <field name="time_created" string="Time Created"/>
                <field name="size" string="Size"/>
                <!--<button name="file_object" string="Download or Play" filename="file_name"/> -->
    <!--            <button name="download_file" type="object" string="Downlaod"/> -->
    <!--            <button name="play_file" type="object" string="Play or download" /> -->

            </tree>
            </field>
            </record>

            <record model="ir.actions.act_window" id="action_voipdata_form">
            <field name="name">Voip Details</field>
            <field name="res_model">filedata</field>
            <field name="view_type">tree</field>
            <field name="view_mode">tree</field>
            </record>
            <record model="ir.actions.act_window" id="action_voip_form">
                <field name="name">Voip Details</field>
                <field name="res_model">filedata</field>
                <field name="view_type">form</field>
                <field name="view_mode">form</field>
                <field name="view_id" ref="voip_form_view"/>
            </record>
      <menuitem name="Voip" parent="base.menu_reporting" id="voip_menu_mainform"/>
            <menuitem name="Voip" parent="voip_menu_mainform" id="voip_menu_subform" action="action_voip_form"/>
        </data>
    </openerp>


class filedata(osv.osv):
    _name = 'filedata'
    _log_access = False
    _columns = {
        'file_name' : fields.char('Name'),
        'file_path' : fields.char('File Path'),
        'time_created' : fields.datetime('Date Time'),
        'size' : fields.char('Size')
    }
0
Avatar
Ignorer
Avatar
More9ike
Meilleure réponse

Hello Anuradha, you have to define this in your xml code not in your python code: For example, in you xml code type <field name="field_name" widget="url">. It will definitely work!

2
Avatar
Ignorer
Anuradha
Auteur

i added in xml but not working :( .please help

Avatar
Serpent Consulting Services Pvt. Ltd.
Meilleure réponse

Hello Anuradha,

You can make field as hyperlink using widget ="url" at your field.

Here i attached a image file where you can find your solution.

image description

4
Avatar
Ignorer
Anuradha
Auteur

@Serpent Consulting I want to do it through code i tested by changing my code as <field name="file_name" string="Name" Widget="url"/> but its not showing as link please help!!

Serpent Consulting Services Pvt. Ltd.

Did you upgrade the module after changing xml file?

Anuradha
Auteur

yes i upgraded xml. but its not showing as link

Serpent Consulting Services Pvt. Ltd.

Did you got any trace back in server or any error? If you got can you please send it to me ?

Anuradha
Auteur

No my log is 2013-09-26 11:23:02,328 24707 INFO testdb werkzeug: 123.237.13.196 - - [26/Sep/2013 11:23:02] "POST /web/dataset/call_button HTTP/1.1" 200 - 2013-09-26 11:23:03,403 24707 INFO testdb werkzeug: 123.237.13.196 - - [26/Sep/2013 11:23:03] "POST /web/dataset/call_kw HTTP/1.1" 200 - 2013-09-26 11:23:03,438 24707 INFO testdb werkzeug: 123.237.13.196 - - [26/Sep/2013 11:23:03] "POST /web/dataset/call_kw HTTP/1.1" 200 - 2013-09-26 11:23:04,435 24707 INFO testdb werkzeug: 123.237.13.196 - - [26/Sep/2013 11:23:04] "POST /web/dataset/call_kw HTTP/1.1" 200 - 2013-09-26 11:23:04,449 24707 INFO

Anuradha
Auteur

I will post my whole code i question please check

Serpent Consulting Services Pvt. Ltd.

I can't figured it out here.If you can send me your module then i will check it in my system. My email id is "a.mehta.serpentcs@gmail.com"

Avatar
Ali Ravani
Meilleure réponse

hello, In xml view

<field name="url" widget="url"/>

1
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
How to show datetime field as "xx days ago"
view field datetime
Avatar
0
mars 21
3698
How to pass value from one view to another?
view field models
Avatar
Avatar
Avatar
2
mars 15
7524
cutomer Treeview not display Name field
view field custom
Avatar
0
mars 15
4250
How to add a link to a view?
server view document hyperlink
Avatar
Avatar
Avatar
2
juil. 22
8220
How in view access to field inside one2many?
view one2many field access
Avatar
1
mai 16
6346
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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