Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

why custom report not changed in email?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
pdfsendmailodoo10
1 Răspunde
5194 Vizualizări
Imagine profil
MUHAMMED ASLAM
  • I created the custom module and override mail.template

  • I changed the "report_template" to my custom sale order report id instead of original

  • This code in base is noupdate="1", so I delete the sale order report from user interface and upgrade my custom module.

But the pdf does not change 

code sample 

<record id="sale.email_template_edi_sale" model="mail.template">

            <field name="report_template" ref="custom_itc_sale_quotation_header"/>

        </record>

Notes


is any problem in my code?How to set custom report there?

is any other method(from python) to solve this?


0
Imagine profil
Abandonează
Imagine profil
Niyas Raphy (Walnut Software Solutions)
Cel mai bun răspuns

Hi Acha Aslam, you can replace your custom mail template to sale by refering the below code,

<field name="report_template" ref="kitchen_order_print.report_custom_kitchen_order"/>

Here you have to mention your custom report name, ie, module_name.report_id .

<record id="sale.email_template_edi_sale" model="mail.template">
<field name="name">Sales Order - Send by Email</field>
<field name="email_from">${(object.user_id.email and '%s &lt;%s&gt;' % (object.user_id.name, object.user_id.email) or '')|safe}</field>
<field name="subject">NIyas</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="kitchen_order_print.report_custom_kitchen_order"/>
<field name="report_name">${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"></field>
</record>
1
Imagine profil
Abandonează
MUHAMMED ASLAM
Autor

Hi Niyas,

Thanks for the answer.I changed my code like this but pdf attachment is not there.I write the code in my custom module's xml view.Finally, I copy your example to my code and replace model name and id of the custom report but only the body is loaded.the pdf attachment does not load.What is the problem?

Niyas Raphy (Walnut Software Solutions)

Hi Aslam, I have checked with the above code and i got everything working fine, default report template is getting replaced with my custom template. In your case is it showing any error or something ?

MUHAMMED ASLAM
Autor

Hi Niyas,

There no errors in my code.I did the same things that you did, but could not load the report.is any idea about this?

MUHAMMED ASLAM
Autor

Hi Niyas,

there is a warning in log file.

odoo.addons.base.ir.ir_model: Creating the ir.model.data report_sale_order in module sale instead of itc_custom..

What is the reason behind this warning?

Niyas Raphy (Walnut Software Solutions)

I just now removed the report then i try to send by email, then the attachment seems to be empty.

So follow this procedure it may help you,

first install the custom report, then install the module for replacing the existing report in the mail

MUHAMMED ASLAM
Autor

Hi Niyas,

I have used 1 custom module for custom report and replacing existing report in mail.

is want to create another module for replacing existing report in mail?

Niyas Raphy (Walnut Software Solutions)

Hi, i tried in two different modules, i already have installed a custom report in the db. i just added the code to replace the report template in the current module. and i followed the above procedure and it works.

MUHAMMED ASLAM
Autor

Thanks, Niyas, I will try that way.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to generate a single pdf of multiple reports of the same template? Rezolvat
pdf reports odoo10
Imagine profil
Imagine profil
Imagine profil
Imagine profil
9
aug. 23
21729
Print Report from a different model from "print" menu. Rezolvat
pdf odoo10 blankpdf
Imagine profil
Imagine profil
1
iul. 20
5906
[odoo10] how to change line in pdf invoice
pdf invoice odoo10
Imagine profil
Imagine profil
2
oct. 18
3821
Pass data to email template from python code Odoo 10
emailtemplate sendmail odoo10
Imagine profil
Imagine profil
1
aug. 17
7839
Odoo 10: widget='pdf_viewer', download option doesn't appear when the field is defined inside notebook.
pdf widget odoo10
Imagine profil
0
nov. 16
7459
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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