Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Odoo 13 Mail template issue

Subscribe

Get notified when there's activity on this post

This question has been flagged
3 Replies
6247 Views
Avatar
A

I configured outgoing mail server, and set Sales order:Confirmation email to  my Outgoing mail server, everything seems ok, well i didnt test until someone told they are getting error after payment is confirmed ( send recovery email for pending order), but going into the website, trying to make a sale and payment using stripe, the payment to stripe work but, but for odor to return to confirmation page and send confirmation email to customer, then an internal server error occur with the logs below.

This process worked before setting up outgoing email server, i set that up because after payment confirmation i dont know where email is going to.


2019-12-12 10:50:12,505 2732 INFO cylockdb werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:12] "GET /payment/stripe/success?reference=S00020-2 HTTP/1.1" 302 - 12 0.012 0.422
2019-12-12 10:50:13,241 2732 INFO cylockdb werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /payment/process HTTP/1.1" 200 - 130 0.157 0.446
2019-12-12 10:50:13,491 2732 INFO ? werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /website_sale_stock/static/src/xml/website_sale_stock_product_availability.xml?debug=1576147813489 HTTP/1.1" 200 - - - -
2019-12-12 10:50:13,565 2732 INFO ? werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /payment_stripe/static/src/xml/stripe_templates.xml?debug=1576147813567 HTTP/1.1" 200 - - - -
2019-12-12 10:50:13,572 2732 INFO cylockdb werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "POST /web/dataset/call_kw/ir.ui.view/render_template HTTP/1.1" 200 - 3 0.003 0.014
2019-12-12 10:50:13,590 2732 INFO ? werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /payment/static/src/xml/payment_processing.xml?debug=1576147813591 HTTP/1.1" 200 - - - -
2019-12-12 10:50:13,637 2732 INFO cylockdb odoo.http: <function odoo.addons.web.controllers.main.call> called ignoring args <kwargs={'context': {'lang': 'en_US'}}>
2019-12-12 10:50:13,642 2732 INFO ? werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /web/static/src/xml/debug.xml?debug=1576147813636 HTTP/1.1" 200 - - - -
2019-12-12 10:50:13,650 2732 INFO cylockdb werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "POST /web/dataset/call HTTP/1.1" 200 - 3 0.004 0.017
2019-12-12 10:50:13,655 2732 INFO cylockdb werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "POST /web/dataset/call_kw/ir.ui.view/render_template HTTP/1.1" 200 - 3 0.003 0.018
2019-12-12 10:50:13,725 2732 INFO ? werkzeug: 192.168.0.26 - - [12/Dec/2019 10:50:13] "GET /website/static/src/xml/website.editor.xml?debug=1576147813694 HTTP/1.1" 200 - - - -
2019-12-12 10:50:14,223 2732 INFO cylockdb odoo.addons.mail.models.mail_template: Failed to render template <Template memory:7fd859bfd6d8> using values {'format_date': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9598>, 'format_datetime': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9048>, 'format_amount': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9f28>, 'format_duration': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c97b8>, 'user': res.users(2,), 'ctx': {'lang': 'en_US', 'tz': 'America/Los_Angeles', 'uid': 2, 'force_send': True, 'active_id': 20, 'active_ids': [20], 'active_model': 'sale.order', 'default_composition_mode': 'comment', 'default_model': 'sale.order', 'default_res_id': 20, 'default_template_id': 12, 'custom_layout': 'mail.mail_notification_paynow', 'tpl_partners_only': True, 'safe': False}, 'object': sale.order(20,)}
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_template.py", line 287, in _render_template
render_result = template.render(variables)
File "/usr/local/lib/python3.6/dist-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 46, in top-level template code
File "/usr/local/lib/python3.6/dist-packages/jinja2/sandbox.py", line 385, in getattr
value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'loop' is undefined
2019-12-12 10:50:14,227 2732 ERROR cylockdb odoo.addons.payment.controllers.portal: Error while processing transaction(s) [9], exception "("Failed to render template <Template memory:7fd859bfd6d8> using values {'format_date': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9598>, 'format_datetime': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9048>, 'format_amount': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c9f28>, 'format_duration': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fd8692c97b8>, 'user': res.users(2,), 'ctx': {'lang': 'en_US', 'tz': 'America/Los_Angeles', 'uid': 2, 'force_send': True, 'active_id': 20, 'active_ids': [20], 'active_model': 'sale.order', 'default_composition_mode': 'comment', 'default_model': 'sale.order', 'default_res_id': 20, 'default_template_id': 12, 'custom_layout': 'mail.mail_notification_paynow', 'tpl_partners_only': True, 'safe': False}, 'object': sale.order(20,)}", '')"
Traceback (most recent call last):

0
Avatar
Discard
Avatar
van oers consultancy
Best Answer

Hi Fabio,

I had the same issue withe the email template. The problem is the footer with field : object.user_id.company_id.e-mail. Odoo has renamed this field to object.user_id.company_id.email
Change this and my problem was solved. Maybe this will hel to solve yours


0
Avatar
Discard
Avatar
Fabio Tielen
Best Answer

Did you found a fix/solution for your problem? 
I have exactly the same problem but with "grant portal access" template. All other templates just load fine, except this one. 
It's a fresh Odoo setup 13. 
When I keep everything at 1 single language English, there is no problem. 
As soon as I load an extra Translation Dutch, the problem kicks in and it also breaks the English template. 

Odoo support is less than useful than ever and only cares about selling a success pack as this clearly is somewhere a bug when somebody loads default translations. 
I didn't even touch the templates, it happens straight out of the box from a new install. 

1
Avatar
Discard
Avatar
Chris Kelley
Best Answer

for any one else with a similar issue, I think odoo did an update which changes a field and they also changed the template to reflect the field change  - except it didnt update the translations (Australian in my case)

I just cut and past the US template body into my AU template body and all worked



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

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

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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