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

Email Template for invoices is corrupt.

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
1 Odpowiedz
1984 Widoki
Awatar
Ryan

I wanted to edit the email template that generates emails when I send an invoice to a customer.

I should have made a copy of the template but I didn't, so now i'm here.

The generated email should look like this:

Dear JOHN DOE,

Here is your invoice INV/2023/03/0007 amounting in $ 1.00 from COMPANY LTD. This invoice is already paid.

Do not hesitate to contact us if you have any questions.

The actual Generated Email looks like this:

Dear % if object.partner_id.parent_id: JOHN DOE (False), % else: JOHN DOE, % endif

Here is your % if object.name: invoice INV/2023/03/0007 % else: invoice %endif % if object.invoice_origin: (with reference: False) % endif amounting in $ 1.00 from COMPANY LTD. % if object.payment_state in ('paid', 'in_payment'): This invoice is already paid. % else: Please remit payment at your earliest convenience. % if object.payment_reference:

Please use the following communication for your payment: INV/2023/03/0007. % endif % endif

Do not hesitate to contact us if you have any questions. % if object.invoice_user_id.signature: % endif 


This whole mess is due to the PRESUMPTION that I could copy (ctrl + c) the template text to preserve it and paste (ctrl + v) it back when I had "tested" some changes, now i have a useless template. Any help would be greatly appreciated.

0
Awatar
Odrzuć
Awatar
Cybrosys Techno Solutions Pvt.Ltd
Najlepsza odpowiedź

Hi,

If you are familiar with code you can try the following codes to make a custom module for this purpose.

You can create another email template for generating emails when you send an invoice to a customer.

<odoo>
    <data noupdate="1">
        <record id="email_template_id"
                model="mail.template">
            <field name="name">Custom Invoice Email</field>
            <field name="model_id"
                   ref="account.model_account_move"/>
            <field name="email_from">{{ (object.user_id.email_formatted or
                user.email_formatted or '') }}</field>
            <field name="partner_to">{{ object.partner_id.id }}</field>
            <field name="email_to">{{ object.partner_id.email }}</field>
            <field name="subject">(Invoice of Passengers,
                Ref{{ object.name }})</field>
            <field name="reply_to">{{ (object.user_id.email_formatted or
                user.email_formatted or '') }}</field>
            <field name="description">description</field>
            <field name="body_html" type="html">
                <div style="margin: 0px; padding: 0px;">
                    <p style="margin: 0px; padding: 0px; font-size: 13px;">
                        Dear <span t-out="object.partner_id.name or ''"/,
                        <br/>
                        Here is your invoice
                        <span style="font-weight: bold;"
                              t-out="object.name or ''"/>

                        amounting in <span style="font-weight: bold;"
                                           t-out="object.amount_total or
                                           ''"/> from COMPANY LTD. This invoice is already paid.
                        <br/>
                        Do not hesitate to contact us if you have any questions.
                        <t t-if="not is_html_empty(object.user_id.signature)">
                            <br/><br/>
                            <t t-out="object.user_id.signature or ''">--<br/></t>
                        </t>
                        <br/><br/>
                    </p>
                </div>
            </field>
            <field name="report_template" ref="account_invoices"/>
            <field name="report_name">{{ (object.name or '').replace('/','_') }}</field>
            <field name="lang">{{ object.partner_id.lang }}</field>
            <field name="auto_delete" eval="True"/>
        </record>
    </data>
</odoo>

After creating an email template you can show the template via action_invoice_sent() function by overriding

def action_invoice_sent(self):
  "" Open a window to compose an email, with the invoice template
            message loaded by default
        """
       
      self.ensure_one()
       mail_template = self.env.ref(
   '          module_name.email_template_id',
              raise_if_not_found=False)
      ctx = dict(
            default_model='account.move',
            default_res_id=self.id,
            default_res_model='account.move',
            default_use_template=bool(mail_template),
            default_template_id=mail_template.id if mail_template else None,
            default_composition_mode='comment',
            mark_invoice_as_sent=True,
            default_email_layout_xmlid=
           "mail.mail_notification_layout_with_responsible_signature",
            force_email=True,
            )

      report_action = {
            'name': _('Send Invoice'),
            'type': 'ir.actions.act_window',
            'view_type': 'form',
            'view_mode': 'form',
            'res_model': 'mail.compose.message',
            'views': [(False, 'form')],
            'view_id': False,
            'target': 'new',
            'context': ctx,
       }  

      if self.env.is_admin() \
                and not self.env.company.external_report_layout_id \
                and not self.env.context.get(
            'discard_logo_check'):
            return self.env['ir.actions.report']._action_configure_external_report_layout(
                report_action)

       return report_action  

Regards

0
Awatar
Odrzuć
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ę
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