Skip to Content
Menu
This question has been flagged
3 Replies
5558 Views

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):

Avatar
Discard
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


Avatar
Discard
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. 

Avatar
Discard
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



Avatar
Discard