Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Where to find the 'object' passed in the mail?

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
mailtemplatesales.orderodoo16features
2 Antworten
4797 Ansichten
Avatar
random_mai

In the Sales, there's a s Send By Email button. In the template of the email, there's a field 'object'. Where does this come from? I checked action_quotation_send but there's no object params passed. This is the email template it automatically referenced to the field 'object'


<record id="mail_template_sale_confirmation" model="mail.template">

<field name="name">Sales: Order Confirmation</field>

<field name="model_id" ref="sale.model_sale_order"/>

<field name="subject">{{ object\.company_id\.name\ \}\}\ \{\{\ \(object\.get_portal_last_transaction\(\)\.state\ ==\ \&\#39;pending\&\#39;\)\ and\ \&\#39;Pending\ Order\&\#39;\ or\ \&\#39;Order\&\#39;\ \}\}\ \(Ref\ \{\{\ object\.name\ or\ \&\#39;n/a\&\#39;\ \}\}\)\</field\>

\ \ \ \ \ \ \ \ \ \ \ \ \<field\ name=\"email_from\"\>\{\{\ \(object\.user_id\.email_formatted\ or\ user\.email_formatted\)\ \}\}\</field\>

\ \ \ \ \ \ \ \ \ \ \ \ \<field\ name=\"partner_to\"\>\{\{\ object.partner_id.id }}</field>

<field name="description">Sent to customers on order confirmation</field>

<field name="body_html" type="html">

</field>

</record>


0
Avatar
Verwerfen
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste Antwort

Hi,

In the provided email template, the object variable is used to reference the current record (sale order) that the email is associated with. In Odoo email templates, the object variable is automatically made available and corresponds to the record for which the email is being sent. In this case, the email template is associated with the Sale Order model (sale.model_sale_order), so object represents an instance of a sale order.

Here's how the object variable is used in the email template you provided:

Subject Line:
The subject field in the email template is using the object variable to include dynamic information in the email subject. For example, it references object.name to include the sale order's name in the subject. 
Sender's Email:
The email_from field in the email template is used to specify the sender's email address. It uses object.user_id.email_formatted to get the email address of the user associated with the sale order. If the user's email is not available, it falls back to the email of the user variable.

Recipient's Email:
The partner_to field in the email template specifies the recipient's email address. It uses object.partner_id.id to get the ID of the partner associated with the sale order.

In summary, the object variable in the email template refers to the sale order record for which the email is being sent, and it allows you to dynamically include information from that sale order in the email subject, sender's email address, and recipient's email address.
To know more about email templates you can refer our blog:-How to create email template in odoo 16


Hope it helps

0
Avatar
Verwerfen
Avatar
Mehjabin Farsana
Beste Antwort

Hi,

The "object" field you mentioned in the email template is typically used to dynamically display information about the document being sent, such as the quotation, sale order, or any other relevant document.

it represents the actual record or document itself, specifically the instance of the document that you are sending via email.

hope this will help you

thanks

0
Avatar
Verwerfen
random_mai
Autor

yes i understand that but where is it passed? I need to add and modify the data passed on that "object" field

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Force sender email for all platform mails Gelöst
mail template
Avatar
Avatar
Avatar
Avatar
Avatar
8
Juli 24
24785
Can I have a customized email domain?
mail odoo16features
Avatar
Avatar
1
Jan. 24
4952
Change or creat Sales Order date
sales.order odoo16features
Avatar
1
Dez. 23
2408
Multiply Column In Odoo 16 enterprise ? Gelöst
sales.order odoo16features
Avatar
Avatar
1
Apr. 23
3310
Changing Position of Email: Customer Adress on Sale/Invoice
mail template
Avatar
Avatar
1
Sept. 21
4516
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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