Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

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

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

How to fix Mail Template

Subscribe

Get notified when there's activity on this post

This question has been flagged
errormailtemplateHTML/CSS
2 Replies
5565 Views
Avatar
Moritz Ocker

My Sale Confirmation Mail Template ist not working. I do get this error:


Fehler beim Erstellen der Vorlage <Template memory:7fb4f60dca58> mit den Werten {'format_date': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fb4f6487840>, 'format_datetime': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fb4f6487ea0>, 'format_amount': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fb503bbdbf8>, 'format_duration': <function MailTemplate._render_template.<locals>.<lambda> at 0x7fb503bbdea0>, 'user': res.users(9,), 'ctx': {'lang': 'de_DE', 'tz': 'Europe/Berlin', 'uid': 9, 'allowed_company_ids': [1], 'template_id': 45, 'active_model': 'mail.template', 'active_id': 45, 'active_ids': [45], 'template_preview_lang': 'de_DE', 'safe': False}, 'object': sale.order(117,)} UndefinedError: 'loop' is undefined

How can I fix my template?


Thank you

0
Avatar
Discard
Ermin Trevisan

Please provide the necessary information (log entries, template code ...)

Moritz Ocker
Author

My template code is:

<div style="font-size:13px;font-family:&quot;Lucida Grande&quot;, Helvetica, Verdana, Arial, sans-serif;margin:0px;padding: 0px;">

<p style="margin:0px;font-size:13px;font-family:&quot;Lucida Grande&quot;, Helvetica, Verdana, Arial, sans-serif;padding: 0px; font-size: 12px;">

Hallo,

<br><br>

% set transaction = object.get_portal_last_transaction()

Ihre Bestellung <strong style="font-weight:bolder;">${object.name}</strong> amounting in <strong style="font-weight:bolder;">${format_amount(object.amount_total, object.currency_id)}</strong>

% if object.state == 'sale' or (transaction and transaction.state in ('done', 'authorized')) :

wurde bestätigt.<br>

Vielen Dank für Ihr Vertrauen!

% elif transaction and transaction.state == 'pending' :

steht aus. Diese wird bestätigt, sobald die Zahlung eingegangen ist.

% if object.reference:

Ihre Zahlungsreferenz ist <strong style="font-weight:bolder;">${object.reference}</strong>.

% endif

% endif

<br><br>

Zögern Sie nicht, uns zu kontaktieren, wenn Sie Fragen haben.

<br><br>

% if object.website_id:

</p>

% for line in object.order_line:

% if not line.is_delivery:

% if line.display_type == 'line_section':

% elif line.display_type == 'line_note':

% else:

% if object.user_id.has_group('account.group_show_line_subtotals_tax_excluded'):

% endif

% if object.user_id.has_group('account.group_show_line_subtotals_tax_included'):

% endif

% endif

% endif

% endfor

<table width="100%" style="border-collapse:collapse;color:#454748;font-size: 12px; border-collapse: collapse;">

<tbody><tr style="border-bottom:2px solid #dee2e6;">

<td width="18%"><strong style="font-weight:bolder;">Produkt</strong></td>

<td>&nbsp;</td>

<td><strong style="font-weight:bolder;">Menge</strong></td>

<td width="10%" align="center"><strong style="font-weight:bolder;">Preis</strong></td>

</tr><tr style="${loop.cycle('background-color:#f2f2f2', 'background-color: #ffffff')}"><td colspan="4"><strong style="font-weight:bolder;">${line.name}</strong></td><td colspan="4"><i>${line.name}</i></td><td style="width:150px;">

<img src="/web/image/product.product/${line.product_id.id}/image_128" style="border-style:none;vertical-align:middle;width:64px;height: 64px; object-fit: contain;" alt="Product image">

</td>

<td align="left">${line.product_id.name}</td>

<td>${line.product_uom_qty}</td><td align="right">${format_amount(line.price_reduce_taxexcl, object.currency_id)}</td><td align="right">${format_amount(line.price_reduce_taxinc, object.currency_id)}</td></tr></tbody></table>

% if object.carrier_id:

% else:

% endif

<table width="40%" style="border-collapse:collapse;color:#454748;font-size: 12px; border-spacing: 0px 4px;" align="right"><tbody><tr>

<td style="border-top:1px solid #dee2e6;" align="right"><strong style="font-weight:bolder;">Lieferdatum:</strong></td>

<td style="border-top:1px solid #dee2e6;" align="right">${format_amount(object.amount_delivery, object.currency_id)}</td>

</tr>

<tr>

<td width="30%" align="right"><strong style="font-weight:bolder;">Zwischensumme:</strong></td>

<td align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>

</tr><tr>

<td style="border-top:1px solid #dee2e6;" width="30%" align="right"><strong style="font-weight:bolder;">Zwischensumme:</strong></td>

<td style="border-top:1px solid #dee2e6;" align="right">${format_amount(object.amount_untaxed, object.currency_id)}</td>

</tr><tr>

<td align="right"><strong style="font-weight:bolder;">Mehrwertsteuer:</strong></td>

<td align="right">${format_amount(object.amount_tax, object.currency_id)}</td>

</tr>

<tr>

<td style="border-top:1px solid #dee2e6;" align="right"><strong style="font-weight:bolder;">Gesamtsumme:</strong></td>

<td style="border-top:1px solid #dee2e6;" align="right">${format_amount(object.amount_total, object.currency_id)}</td>

</tr>

</tbody></table>

<br>

% if object.partner_invoice_id:

% endif

% if object.partner_shipping_id and not object.only_services:

% if object.carrier_id:

% endif

% endif

<table width="100%" style="border-collapse:collapse;color:#454748;font-size: 12px;"><tbody><tr>

<td style="padding-top:10px;">

<strong style="font-weight:bolder;">Rechnung an:</strong>

${object.partner_invoice_id.street or ''}

${object.partner_invoice_id.city or ''}

${object.partner_invoice_id.state_id.name or ''}

${object.partner_invoice_id.zip or ''}

${object.partner_invoice_id.country_id.name or ''}

</td>

</tr>

<tr>

<td>

<strong style="font-weight:bolder;">Bezahlungsmethode:</strong>

% if transaction.payment_token_id:

${transaction.payment_token_id.name}

% else:

${transaction.acquirer_id.name}

% endif

(${format_amount(transaction.amount, object.currency_id)})

</td>

</tr><tr>

<td>

<br>

<strong style="font-weight:bolder;">Lieferung an:</strong>

${object.partner_shipping_id.street or ''}

${object.partner_shipping_id.city or ''}

${object.partner_shipping_id.state_id.name or ''}

${object.partner_shipping_id.zip or ''}

${object.partner_shipping_id.country_id.name or ''}

</td>

</tr><tr>

<td>

<strong style="font-weight:bolder;">Liefermethode:</strong>

${object.carrier_id.name}

% if object.carrier_id.fixed_price == 0.0:

(Free)

% else:

(${format_amount(object.carrier_id.fixed_price, object.currency_id)})

% endif

</td>

</tr></tbody></table>

% endif

<p style="margin:0px;font-size:13px;font-family:&quot;Lucida Grande&quot;, Helvetica, Verdana, Arial, sans-serif;"></p>

</div>

Where can I find the other necessary information?

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
Related Posts Replies Views Activity
?"Your country might be blocked by our hosting provider" error when I create new website
error
Avatar
0
अक्तू॰ 25
585
Payment Page Return Error with Razorpay on Mobile Devices
error
Avatar
0
सित॰ 25
1189
Error after installing "purchase" app in Odoo version 18
error
Avatar
Avatar
1
दिस॰ 24
6721
error schema for TourStep Error
error
Avatar
0
नव॰ 24
2588
Can't modify manifest version of custom module [Odoo.sh]
error
Avatar
Avatar
Avatar
2
जुल॰ 24
5238
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة 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, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

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