Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

How to send a mail thread when sending messages?

Odebírat

Get notified when there's activity on this post

This question has been flagged
mailmessagesthread
1 Odpovědět
14627 Zobrazení
Avatar
Flyguy

From a lead in OpenERP I can send a message to the lead. When the lead replies, I can see that reply in the lead. So this mailing back and forth works fine.

But whenever I mail the lead, he only receives the (current) message that I send him. I would like him to receive the entire thread. So instead of just the latest message, I want him to receive the entire history of the conversation.

How can I get this to work?

5
Avatar
Zrušit
Avatar
MUHAMMAD Imran
Nejlepší odpověď

In Odoo, you can use the message_post method to send a message and create a mail thread. Here's an example of how you might use this method to send a message:


# Send a message on a record

record.message_post(

    body='This is the message body',

    subject='This is the subject',

    partner_ids=[partner_id], # list of recipient partner ids

    attachment_ids=[attachment_id], # list of attachment ids

    message_type='comment', # type of message (comment, email, etc.)

    subtype='mail.mt_comment', # subtype of message

    author_id=self.env.user.partner_id.id, # id of the message's author

)


# Send a message on a model

self.env['mail.thread'].message_post(

    body='This is the message body',

    subject='This is the subject',

    partner_ids=[partner_id], # list of recipient partner ids

    attachment_ids=[attachment_id], # list of attachment ids

    message_type='comment', # type of message (comment, email, etc.)

    subtype='mail.mt_comment', # subtype of message

    author_id=self.env.user.partner_id.id, # id of the message's author

)

The message_post method creates a new mail.message record and adds it to the mail thread associated with the record or model. The message will be sent to the specified recipients (partner_ids) and will include any specified attachments (attachment_ids).


You can also use the mail.compose.message model to create and send a message. This allows you to specify additional options, such as the message template and the email addresses of the recipients. Here's an example of how you might use this model to send a message:


compose_form = self.env.ref('mail.email_compose_message_wizard_form')

ctx = {

    'default_model': 'my.model',

    'default_res_id': self.id,

    'default_use_template': bool(template_id),

    'default_template_id': template_id,

    'default_composition_mode': 'comment',

    'mark_so_as_sent': True,

}

return {

    'name': _('Compose Email'),

    'type': 'ir.actions.act_window',

    'view_mode': 'form',

    'res_model': 'mail.compose.message',

    'views': [(compose_form.id, 'form')],

    'view_id': compose_form.id,

    'target': 'new',

    'context': ctx,

}

This will open a wizard that allows the user to compose and send an email message. The message will be added to the mail thread associated with the specified record or model

-1
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
How to post automatically a message on the discussion thread ?
mail thread
Avatar
Avatar
Avatar
2
čvc 18
30503
[SOLVED] Extend mail thread view (v10) Vyřešeno
mail extend thread
Avatar
Avatar
1
lis 17
7248
Fetching e-mail from e-mail account
mail messages fatchmail
Avatar
Avatar
1
čvc 15
9874
How do I override the email template used in a child of mail.thread?
mail templates template thread
Avatar
0
srp 22
6649
why the mail and messages inbox suddenly becomes empty ?
mail messages empty inbox
Avatar
0
bře 15
5438
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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