Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

why custom report not changed in email?

Naroči se

Get notified when there's activity on this post

This question has been flagged
pdfsendmailodoo10
1 Odgovori
5188 Prikazi
Avatar
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
Avatar
Opusti
Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

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
Avatar
Opusti
MUHAMMED ASLAM
Avtor

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
Avtor

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
Avtor

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
Avtor

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
Avtor

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!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to generate a single pdf of multiple reports of the same template? Solved
pdf reports odoo10
Avatar
Avatar
Avatar
Avatar
9
avg. 23
21727
Print Report from a different model from "print" menu. Solved
pdf odoo10 blankpdf
Avatar
Avatar
1
jul. 20
5893
[odoo10] how to change line in pdf invoice
pdf invoice odoo10
Avatar
Avatar
2
okt. 18
3818
Pass data to email template from python code Odoo 10
emailtemplate sendmail odoo10
Avatar
Avatar
1
avg. 17
7838
Odoo 10: widget='pdf_viewer', download option doesn't appear when the field is defined inside notebook.
pdf widget odoo10
Avatar
0
nov. 16
7455
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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