Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

use the input by customer in free text attributes in odoo v18 online

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
3 Besvarelser
1217 Visninger
Avatar
Bala Yaswanth

Hi I need help.. I created gift card product in ,odoo 18 enterprise online version ,with free text attributes recepient email and custom message, these fields should enable customer to input recepient email and message that should be used to send automed email gift card. these input appear  in sales order line but i could not fetch them to store in model and later use them to send email using a new template or modify the email template that odoo automatically sends. I used automated action on loyality card model with executable code. this code did not give error while saving but stops the sales order confirmation step.

the following code is used to fetch those stored details

mail = line.product_custom_attribute_value_ids.filtered(lambda a: a.custom_product_template_attribute_value_id.name == 'Email').name

                message = line.product_custom_attribute_value_ids.filtered(lambda a: a.custom_product_template_attribute_value_id.name == 'Message').name 


this does not work

               

How could i fetch the values the customer inputs in free text attribute values. is there any alternative way to achieve this functionality.


Thanks in advance

0
Avatar
Kassér
Avatar
Ritik (Wan Buffer Services)
Bedste svar

In Odoo 18 Enterprise Online, free text attributes allow customers to input values such as recipient email and a custom message during a sale. However, the system does not automatically store these values in a structured way that enables further use, like triggering automated actions or sending emails.

To properly store and use the input data, consider the following approaches:

  1. Custom Fields on Sale Order Line – Extend the sale order line model (sale.order.line) to store the free text attribute values explicitly.
  2. Automated Action with Python Code – Ensure your automated action correctly retrieves attribute values from sale.order.line and links them to the required model.
  3. Odoo Studio or Custom Module – Use Odoo Studio or develop a module to capture and store these attributes properly within the database.
  4. Email Automation via Server Actions – Create a server action that retrieves the stored values and triggers email automation.

At Wan Buffer Services, we specialize in Odoo customization and can assist in implementing a structured workflow to capture and process customer inputs efficiently.

0
Avatar
Kassér
Avatar
Odiware Technologies
Bedste svar

To fetch customer-inputted free text attributes in Odoo 18 from the sales order line, use the correct model relations. Your current code is trying to access name, but for free text attributes, the value is stored differently. Try this:

Corrected Code:

python

CopyEdit

email_attr = line.product_custom_attribute_value_ids.filtered( lambda a: a.custom_product_template_attribute_value_id.name == 'Email' ).custom_value message_attr = line.product_custom_attribute_value_ids.filtered( lambda a: a.custom_product_template_attribute_value_id.name == 'Message' ).custom_value

Why This Works:

  • custom_value stores the actual user input for free text attributes.
  • name is used for attribute names, not values.

Alternative Approach:

If you still have issues, you can store the values in a custom field in sale.order.line during order confirmation and later use them for the email template.

0
Avatar
Kassér
Avatar
Bala Yaswanth
Forfatter Bedste svar

need help in implementing few functionality in webshop 

1.The current eCommerce filter for the "color" attribute lists all 1500 colors, making it difficult for customers to filter products effectively. Instead of listing all colors, we need to group colors into 14 main colors and only display these in the filtering options. I tried changing the html script of shop page and the java script but did not work out for me. 

2. Gift card. The website should allow customer to input the message which should appear in the gift card email sent automatically and the template the customer selects should be in place of standard image in the email. Validity should be one year. I created a gift card product with multiple price varinats and template. I had issues updating the expiry date in automation rules and editing the email template

3. Return voucher: the gift card can be used for refund. However this gift card should be valid for three months and the orders placed using that specific gift voucher should not be returnable. 

I tried to do these using the automated actions and modifying html ,however could not achieve the functionality. So I am looking for some tips or support on this.

0
Avatar
Kassér
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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