Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
mailtemplatesales.orderodoo16features
2 Răspunsuri
4861 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Mehjabin Farsana
Cel mai bun răspuns

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
Imagine profil
Abandonează
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

Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
Force sender email for all platform mails Rezolvat
mail template
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
8
iul. 24
24857
Can I have a customized email domain?
mail odoo16features
Imagine profil
Imagine profil
1
ian. 24
5016
Change or creat Sales Order date
sales.order odoo16features
Imagine profil
1
dec. 23
2486
Multiply Column In Odoo 16 enterprise ? Rezolvat
sales.order odoo16features
Imagine profil
Imagine profil
1
apr. 23
3381
Changing Position of Email: Customer Adress on Sale/Invoice
mail template
Imagine profil
Imagine profil
1
sept. 21
4578
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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