Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

How to fix Mail Template

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
errormailtemplateHTML/CSS
2 Odpowiedzi
5548 Widoki
Awatar
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
Awatar
Odrzuć
Ermin Trevisan

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

Moritz Ocker
Autor

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?

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
?"Your country might be blocked by our hosting provider" error when I create new website
error
Awatar
0
paź 25
578
Payment Page Return Error with Razorpay on Mobile Devices
error
Awatar
0
wrz 25
1178
Error after installing "purchase" app in Odoo version 18
error
Awatar
Awatar
1
gru 24
6690
error schema for TourStep Error
error
Awatar
0
lis 24
2574
Can't modify manifest version of custom module [Odoo.sh]
error
Awatar
Awatar
Awatar
2
lip 24
5220
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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