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

How to attrib variable value to a tag attribute?

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
valuesvariableattribute
1 Beantwoorden
10267 Weergaven
Avatar
Pascal Tremblay

Hello there,

I'm searching the way to directly attrib a variable value to an attribute of a tag :

    <template id="website_lapagept.facebook_open_graph_tags_iv">

        <t t-set="variable" t-value="FFRGRGRGFGFGFBVFVFGGFGFGFVF" />

        <meta property="og:title" content="" />

        <meta property="og:type" content=variable />  (IT DOESN'T WORK)

    </template>


Could you help me please?


UPDATE #1

ref : https://www.odoo.com/fr_FR/forum/help-1/question/append-value-to-attribute-in-qweb-template-76953

If I inherit the above template, I can change the « content » attribute value. But it is not what I want. Can we do this without inheritance and without xpath?

    <template id="website_lapagept.facebook_open_graph_title_iv" inherit_id="website_lapagept.facebook_open_graph_tags_iv" name="Facebook open graph description - IV">

            <xpath expr='//meta[@property="og:title"]' position="attributes">

                    <attribute name="content">Intime &amp; vilain</attribute>

            </xpath>

    </template>


UPDATE #2

This new way doesn't work too :

    <template id="website_lapagept.facebook_open_graph_tags_iv">

        <t t-set="variable" t-value="FFRGRGRGFGFGFBVFVFGGFGFGFVF" />

        <meta t-att="{'property':'og:type', 'content':variable}" />

</template>


UPDATE #3

This new way doesn't work too : 

    <template id="website_lapagept.facebook_open_graph_tags_iv">

        <t t-set="variable" t-value="FFRGRGRGFGFGFBVFVFGGFGFGFVF" />  

        <meta property="og:type" t-att-content="variable" />

    </template>

0
Avatar
Annuleer
Avatar
Pascal Tremblay
Auteur Beste antwoord

This one works. It was what we needed.

<t t-if="main_object and 'description_sale' in main_object and main_object.description_sale">

    <t t-set="og_description_sale" t-value="main_object.description_sale"/>

    <meta property="og:description" t-att-content="og_description_sale" />

</t>

0
Avatar
Annuleer
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
Read out certain product attribute values in purchase.order.line
product values attribute
Avatar
Avatar
1
aug. 21
3878
How to import Attribute Values via Excel
import values excel attribute
Avatar
1
aug. 23
5421
Product Template Attribute Values: Sequence/Sort Order of Attribute Values in many2many_tags widget in Product Form
values sequence attribute odoo11
Avatar
Avatar
Avatar
2
mei 20
10431
Reference a variable
variable
Avatar
Avatar
1
jul. 23
3862
Product Search from Attribute ID in Odoo 12
attribute
Avatar
0
sep. 19
15907
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