Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

External ID not found in the system: %s' % xmlid

Subscribe

Get notified when there's activity on this post

This question has been flagged
mailreportexternal_idOdoo13.0
5 Replies
6291 Views
Avatar
himaOdoo

i have created a custome module that has to send and email and upload a report inside it 

i have preceed this way 

on my model.py i have defined a function that a object button has to call for sending email 

def send_job_certifica(self): template_id = self.env.ref('attestation.job_certifica_email_template').id template = self.env['mail.template'].browse(template_id) template.send_mail(self.id, force_send=True) self.state = 'send'

and on my xml file 


 <record id='job_certifica_view_form' model='ir.ui.view'>
            <field name="name">job.certifica.form</field>
            <field name="model">job.certifica</field>
            <field name="arch" type="xml">
               <form>
                <header>
             <button name="send_job_certifica" string="Send" type="object" states="valide" class="oe_highlight"/>
                <field name="state" widget="statusbar"/>                 
                </header>
             </form>
            </field>
</record>
and my email_template 

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data noupdate="1">

        <record id="job_certifica_email_template" model="mail.template">
            <field name="name">ATTESTATION DE TRAVAIL: envoie par email</field>
             <field name="model_id" ref="attestation.model_job_certifica"/>
            <field name="email_from">xyz@gmail.com</field>
            <field name="email_to">${object.email_id}</field> 
            <field name="subject">Attestation ( Mme/Ms ${object.employee_name})</field>    
            <field name="body_html" type="html">
                <div style="margin: 0px; padding: 0px">
                    <p style="margin: 0px; padding: 0px; font-size: 13px;">
                        Chèr(e) ${object.employee_name}
                        <br /><br/>
                        voilà votre Atesttation de travail
                        <br /><br />
                        n'hzsitez pas de nous contacter si vous avez des questions
                    </p>
                </div>
            </field>
                <field name="report_template" ref="action_report_job"/>
                <field name="report_name">Attestation de travail_${object.name}</field>
        </record>
</data> </odoo>

and here is my repport 

<?xml version="1.0" encoding="utf-8"?>
<odoo>

	<report
		id="action_report_job"
		string="Attestation"
		model="job.certifica"
		report_type="qweb-pdf"
		name="attestation.job"
		print_report_name="'Attestation'"/>

        <template id="job">
        
        <t t-call="web.html_container">
			<t t-foreach="docs" t-as="o">
			<t t-call="web.external_layout">

                        </t>
                         </t>
    </t>
    </template>
</odoo>

and i declared the form view file and also the repport as well as the template on my __manifest__.py 

and i still got this error 


 "External ID not found in the system: attestation.action_report_job"


what i am still missing ? 

0
Avatar
Discard
himaOdoo
Author

and i ll have to do this whenever i want to install the module ?

Niyas Raphy (Walnut Software Solutions)

why... make the change as described once and hope it will remains as it is

himaOdoo
Author

still don't get it, if you mean by importing the filed where i am defining my report (let's say job_report.xml) i already did it in manifest ( data:' ['report/job_report.xml',]

and also in which concerns mail_template.xml (data:'['data/mail_template.xml'])

or you mean there is a UI way to handle this ?

himaOdoo
Author

now i get it, you mean to import the field by order, report first and mail_template second ok sir, thank you

Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

First import the file where you define this report/action, then the import the file which refer it in manifest.


Thanks

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

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

Sign up
Related Posts Replies Views Activity
How to attach wizard report's report in mail
mail report
Avatar
Avatar
1
Oct 15
17068
How to block Many2One value Changes
mail report
Avatar
Avatar
Avatar
Avatar
3
Mar 15
7639
v13: Error: most likely hit a memory limit
report memory Odoo13.0
Avatar
Avatar
1
Dec 23
5350
Footer on the last page of pdf report
report Odoo13.0 pdfreport
Avatar
0
Oct 22
3525
How to send email with a xls file attached ?
mail Odoo13.0 scheduledaction
Avatar
0
Jun 21
3438
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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