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

Attach automatically report to mail

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
mailreportautomatically
2 Odpowiedzi
20893 Widoki
Awatar
MALLE SOULEYMANE

Hello, anyone have any idea of how to automatically attach a report to an email like Sale> Quote> Email? what is the relationship of this with the "edi" module?

1
Awatar
Odrzuć
Awatar
Gopakumar N G
Najlepsza odpowiedź

Yes you can use schedulers to send e-mails with attachment automatically (here reports) or you can configure the email template to attach reports automatically. For example: I have created a scheduler on model student.student as

 <?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <record model="ir.cron" id="cronjob_student_mail_scheduler">
            <field name='name'>Send Email on Intervals</field>
            <field name='interval_number'>1</field>
            <field name='interval_type'>months</field>
            <field name="numbercall">-1</field>
            <field name="active">False</field>
            <field name="doall" eval="False" />
            <field name="model">student.student</field>
            <field name="function">send_mail</field>
            <field name="args">(None,)</field>
        </record>
    </data>
</openerp>

and it calls the send_mail method in student.student model and the method is

def send_mail(self, cr, uid, ids,  cron_mode=True, context=None):
        print '================send email=================='
        template_id=self.pool.get('email.template').search(cr, uid, [('name', '=', 'Student Details - Send by Email')], context=context)[0]
        print '........template id..........', template_id
        email_obj=self.pool.get('email.template').send_mail(cr, uid, template_id, ids[0], force_send=True)
        print 'email_obj................', email_obj

and I have created an email template as

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data noupdate="1">
        <!--Email template -->
        <record id="email_template_student_details" model="email.template">
            <field name="name">Student Details - Send by Email</field>
            <field name="email_from">gopakumar@zbeanztech.com</field>
            <field name="subject">Welcome</field>
            <field name="email_to">${object.email}</field>
            <field name="model_id" ref="model_student_student"/>
            <field name="auto_delete" eval="True"/>
            <field name="report_template" ref="student_report.student_report"/>
            <field name="report_name">${(object.partner_id.name)}_Details</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
    <p>Hello ${object.partner_id.name},</p>

    <p>You have been registered in the ${object.user_id.company_id.name} with the following details.</p>

    <p style="border-left: 1px solid #8e0000; margin-left: 30px;">
        &nbsp;&nbsp;Admission Number: <strong>${object.admit_no}</strong><br />
        &nbsp;&nbsp;University Number: <strong>${object.exam_reg_no}</strong><br />
        &nbsp;&nbsp;Programme: <strong>${object.programme_id.name}</strong><br />
        &nbsp;&nbsp;Grade: <strong>${object.grade_id.name}</strong><br />
        &nbsp;&nbsp;Area: <strong>${object.area_id.name}</strong><br />
        &nbsp;&nbsp;Division: <strong>${object.division_id.name}</strong><br />
    </p>

    <p>Please find the attachment.</p>
    <p>Thanks</p>

</div>            
            ]]></field>
        </record>
    </data>
</openerp>

and in that template I have specified the report student_report in the module student_report (<field name="report_template" ref="student_report.student_report"/>)

So on executing the scheduler the email will be send with the report as attachment.

1
Awatar
Odrzuć
Awatar
MALLE SOULEYMANE
Autor Najlepsza odpowiedź

Ok thanks for your answer, but I don't understand thi line : <field name="model_id" ref="model_student_student"/> model_student_student is the id of what model?

0
Awatar
Odrzuć
Gopakumar N G

It is the model student.student and it should be given in the model_id field of email template as 'model_student_student'

René Schuster

Is there a way to add the 'form' keyword to the 'datas' dictionary that is used in the email.template send_mail method?

Want to use the same report that is triggered by a button via: datas = { 'ids': [], 'model': 'timesheet.timesheet', 'form': data } return { 'type': 'ir.actions.report.xml', 'report_name': 'timesheet.monthly.report', 'datas': datas, }

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ść
How to attach wizard report's report in mail
mail report
Awatar
Awatar
1
paź 15
17028
How to block Many2One value Changes
mail report
Awatar
Awatar
Awatar
Awatar
3
mar 15
7603
create and attach pdf to email template
pdf mail report
Awatar
Awatar
Awatar
2
mar 15
11043
How to attach html report in email?
mail report html attachement
Awatar
1
cze 24
471
External ID not found in the system: %s' % xmlid
mail report external_id Odoo13.0
Awatar
Awatar
5
sty 23
6263
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