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

"KeyError: 'body'" Error sending email using "New message" from chatter. (Sending online proposals work though)

Abonare

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

Această întrebare a fost marcată
emailodoo10.0
5 Răspunsuri
10721 Vizualizări
Imagine profil
Alexander Lindemann

Hi, I am running a Odoo10 community. I get an error when I try to send emails to contacts. Sending online proposals work though. Heres the traceback. Any tips on what I can do to correct it?

Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/http.py", line 638, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo/odoo-server/odoo/http.py", line 675, in dispatch result = self._call_function(**self.params) File "/odoo/odoo-server/odoo/http.py", line 331, in _call_function return checked_call(self.db, *args, **kwargs) File "/odoo/odoo-server/odoo/service/model.py", line 119, in wrapper return f(dbname, *args, **kwargs) File "/odoo/odoo-server/odoo/http.py", line 324, in checked_call result = self.endpoint(*a, **kw) File "/odoo/odoo-server/odoo/http.py", line 933, in __call__ return self.method(*args, **kw) File "/odoo/odoo-server/odoo/http.py", line 504, in response_wrap response = f(*args, **kw) File "/odoo/odoo-server/addons/web/controllers/main.py", line 862, in call_kw return self._call_kw(model, method, args, kwargs) File "/odoo/odoo-server/addons/web/controllers/main.py", line 854, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 681, in call_kw return call_kw_multi(method, model, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 672, in call_kw_multi result = method(recs, *args, **kwargs) File "/odoo/odoo-server/addons/mail/models/mail_thread.py", line 1878, in message_post new_message = MailMessage.create(values) File "/odoo/odoo-server/addons/mail/models/mail_message.py", line 722, in create user_signature=self.env.context.get('mail_notify_user_signature', True)) File "/odoo/odoo-server/addons/mail/models/mail_message.py", line 790, in _notify partners._notify(self, force_send=force_send, send_after_commit=send_after_commit, user_signature=user_signature) File "/odoo/odoo-server/addons/mail/models/res_partner.py", line 156, in _notify ('notify_email', '!=', 'none')])._notify_by_email(message, force_send=force_send, send_after_commit=send_after_commit, user_signature=user_signature) File "/odoo/odoo-server/addons/mail/models/res_partner.py", line 201, in _notify_by_email new_emails, new_recipients_nbr = self._notify_send(fol_values['body'], fol_values['subject'], recipient_template_values['followers'], **base_mail_values)KeyError: 'body'

0
Imagine profil
Abandonează
Alexander Lindemann
Autor

Thank you @mahmoud. I figured it out. It was a faulty "string" in the email template config. I actually removed the existing config, saved, restarted and added the exact config, rebooted (for some reason) and it magically worked.

Imagine profil
Eric Belcher
Cel mai bun răspuns

I'm having exactly the same problem. If I select a contact and try and send them a message using the 'out of the box' template 'partner mass mail' I get a server error ending wih

  File "/opt/ / /addons/mail/models/res_partner.py", line 206, in _notify_by_email
    new_emails, new_recipients_nbr = self._notify_send(fol_values['body'], fol_values['subject'], recipient_template_values['followers'], **base_mail_values)
KeyError: 'body'

I've created another template with an email body. I only have one language (english) so translation tables to update. Given I've seen this reported multiple times with either no answers or answers I don't understand, can anyone shine a light on this. I have two instances of Odoo, an Enterprise and Community and they both have the same problem.

Thanks in advance!

0
Imagine profil
Abandonează
Mike Lorusso

I fixed it as follows (Odoo 11 CE)

Activate Developer mode

Under Settings > Mail Template, open template "Notification EMail"

Click Edit

Click the button for Code view

remove all the code and replace with something very simple such as:

<p style="color: #555555;">

Email sent by

</p>

Save

Test by sending the contact a message. It worked, and the mail was sent without errors.

I then went back to the Notification Email template, edited it, selected the code view again, and pasted in the code from the English version of the template.

That code, in case you need it, is as follows for 11CE:

<p>

% set company = ctx.get('company', user.company_id)

</p><div>

% if ctx.get('has_button_access'):

<div itemscope="" itemtype="http://schema.org/EmailMessage">

<div itemprop="potentialAction" itemscope="" itemtype="http://schema.org/ViewAction">

<link itemprop="target" href="${ctx['button_access']['url']}">

<link itemprop="url" href="${ctx['button_access']['url']}">

<meta itemprop="name" content="View ${ctx['model_name']}">

</div>

</div>

% endif

% if not ctx['is_discussion'] or not len(ctx['actions']) == 0 or ctx.get('has_button_access'):

<div summary="o_mail_notification" style="padding: 0px; width:600px;">

<table style="border-spacing:0px;width: 600px; margin-top: 5px;" cellspacing="0" cellpadding="0" border="0">

<tbody><tr>

<td valign="center">

% if ctx.get('has_button_access'):

<a href="${ctx['button_access']['url']}" style="padding: 8px 12px; font-size: 12px; color: #FFFFFF; text-decoration: none !important; font-weight: 400; background-color: #875A7B; border: 0px solid #875A7B; border-radius:3px">${ctx['button_access']['title']}</a>

% endif

% if ctx.get('has_button_follow'):

% if ctx.get('has_button_access'):

|

% endif

<a href="${ctx['button_follow']['url']}" style="color: #875A7B; text-decoration: none !important;">${ctx['button_follow']['title']}</a>

% elif ctx.get('has_button_unfollow'):

% if ctx.get('has_button_access'):

|

% endif

<a href="${ctx['button_unfollow']['url']}" style="color: #875A7B; text-decoration: none !important;">${ctx['button_unfollow']['title']}</a>

% endif

% if ctx.get('actions'):

% for action in ctx['actions']:

|

<a href="${action['url']}" style="color: #875A7B; !important;">${action['title']}</a>

% endfor

% endif

</td>

<td valign="center" align="right">

<img src="/logo.png?company=${company.id}" style="border-style:none;border-image-width:1;border-image-source:none;border-image-slice:100%;border-image-repeat:stretch;border-image-outset:0;border-left-color:currentcolor;border-bottom-color:currentcolor;border-right-color:currentcolor;border-top-color:currentcolor;padding: 0px; margin: 0px; height: auto; max-width: 80px; max-height: 40px;" alt="${company.name}">

</td>

</tr>

<tr>

<td colspan="2" style="text-align:center;">

<hr style="border-style:solid none none none;border-image-width:1;border-image-source:none;border-image-slice:100%;border-image-repeat:stretch;border-image-outset:0;border-left-color:currentcolor;border-bottom-color:currentcolor;border-right-color:currentcolor;background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin:10px 0;" width="100%">

% if ctx.get('subtype') and ctx.get('subtype').internal:

<p style="background-color: #f2dede; padding: 5px; margin-bottom: 16px;">

<strong>Internal communication</strong>: Replying will post an internal note. Followers won't receive any email notification.

</p>

% endif

</td>

</tr>

</tbody></table>

</div>

% endif

<div>

${object.body | safe}

</div>

% if ctx.get('tracking'):

<ul>

% for tracking in ctx['tracking']

<li>${tracking[0]} : ${tracking[1]} -&gt; ${tracking[2]}</li>

% endfor

</ul>

% endif

% if ctx.get('signature'):

${ctx['signature'] | safe}

% endif

<br><p></p><p>

</p><p style="color: #555555;">

Sent by

% if ctx.get('website_url'):

<a href="${ctx['website_url']}" style=" color: #875A7B;">

% endif

${ctx.get('company_name')}

% if ctx.get('website_url'):

</a>

% endif

using

<a target="_blank" href="https://www.odoo.com" style=" color: #875A7B;">Odoo</a>.

</p>

</div><p></p>

Imagine profil
Philippe Thuaud
Cel mai bun răspuns

Hi Alexander,

Which email template is it? I cannot figure it out.

Thank you

0
Imagine profil
Abandonează
Mike Lorusso

Hi, it's the one called "Notification Email" with field "Applies to" = Message.

Imagine profil
Devangi Shinde
Cel mai bun răspuns

@v11 odoo community

Solved Error : Odoo - outgoing email KeyError: 'body'

Also Reference: https://stackoverflow.com/questions/39364364/odoo-outgoing-email-keyerror-body/47993347#47993347

0
Imagine profil
Abandonează
Imagine profil
Mahmoud Abdelwahid
Cel mai bun răspuns

The problem in body of the email, may be empty , Check it

0
Imagine profil
Abandonează
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
Setting up Email in Odoo - PO is not Send
email odoo10.0
Imagine profil
Imagine profil
2
iul. 19
5605
Email set up
email odoo10.0
Imagine profil
Imagine profil
Imagine profil
3
ian. 17
4848
How to send mails from inbox view? Rezolvat
email inbox odoo10.0
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
8
mai 17
8044
need more felixiblity and inovation on email marketing tools
email
Imagine profil
0
nov. 25
171
After editing the Sales Order Confirmation email template, Odoo isn't using it.
email
Imagine profil
Imagine profil
1
iul. 25
1991
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