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
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. Mails Dynamic Attachments v 14.0
  4. Sales Conditions FAQ

Mails Dynamic Attachments

by Alliantum https://www.alliantum.com
Odoo
v 14.0 Third Party 63
Download for v 14.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 266
Technical Name odoo_mail_attachments
LicenseAGPL-3
Websitehttps://www.alliantum.com
Versions 12.0 13.0 14.0
You bought this module and need support? Click here!
Alliantum

Mails Dynamic Attachments

Beta License: AGPL-3 Alliantum/odoo_mail_attachments

By default, Odoo provides us with options to attach certain documents to our email templates. They can be both, static files, like images, pdf, text files… and also dynamic reports that are generated depending on the current record, like for example a SO pdf to be sent to your customer.

But what happens when you would like to add more dynamic attachments, like for example, not just the SO document, but also the Delivery Slips of the related shipping for that SO? And even, do this just under certain circumstances! That’s the point where this module become handy.

With this module you can start creating rules for objects like Sales Order, Invoices, Purchases or another, that will decide which pdf document will be attached to the emails sent from the context actions of that object. The power of this module is that those pdf Documents can be generated dynamically from related objects to the current one.

The rules will allow you to define under which circumstances, depending on the fields of the current object you want the attachments to be generated, filter the related objects, attach static files based on rules, and attach static files based on languages.

Table of contents

  • Configuration
  • Usage
  • Bug Tracker
  • Credits
    • Authors
    • Contributors
    • Other credits
    • Maintainers

Configuration

  1. In order to add dynamically attachment to your emails. You must go to Settings / General Settings and scroll down to the bottom. A new section Dynamic Mail Attachments will have appeared there, then click on Manage button to launch the wizard and start creating rules.
Alliantum
  1. Start adding attachments is very easy, just click Add a line, then select the Model on which the current line will apply (for example, when sending an email from a Sale Order), and also decide the pdf Report to be used.
Alliantum
  1. Now it’s very important to pay attention to the Path to Report Model field. Here you need to enter the path to follow starting from the Trigger Model to the records that will be used by the Report. For doing this you can use dot notation when needed (see example below), in picture picture, it’s just ``picking_ids``. In case you don’t have access to the code used for create the objects, you can activate the developer mode in Odoo, and hover the fields to get the technical name of the field.

For example:

  • Your rule applies to Sale Order, then if you want to attach the Delivery Slip to a Sale Order, you simply have to enter ‘picking_ids’.
  • But, if your rule applies to Invoices for example, you will need maybe something like, ‘invoice_line_ids.sale_line_ids.order_id.picking_ids’. Notice here how the x2many fields are including here all the possible existing records.
Alliantum
  1. Filtering is also available to decide in which circumstances our rule line will take action. If you just need to attach certain file for a Sale Order, which Customer has some special value in a concrete field, let’s say, partner_id.is_premium, then you can use the button Add Filter to enter a domain that matches your needs. Something similar can be also done for the related object, in our examples the Delivery.
Alliantum
  1. Continuing with more extra options, we can for instance attache static files in a couple of ways, one for adding to your email attachments that were already loaded in Odoo, or to upload on the fly a new one that really suits you.
  2. And finally, there’s a powerful way of attaching files based on the language of one of the related records of the correct object (images that includes text, Terms and Conditions, or any other kind of document). You can think of it like, again, in a SO, when we need to attach some file in the language of our customer. Let’s say, that in out Sales Order, our Customer has set Language to French, in such a case, our configuration line will look like this:
Alliantum

Usage

Once everything is configured, the only thing you need to do is go ahead to one of the objects that allow sending emails, and try sending one of them, for one record that matched your rules criteria. Then in the chatter, you should find the attachments that applies in that case.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Alliantum

Contributors

  • David Moreno david.moreno@alliantum.com

Other credits

The development of this module has been financially supported by:

  • Alliantum (https://www.alliantum.com)

Maintainers

This module is maintained by Alliantum.

Alliantum

Alliantum, is a company whose mission is to support the widespread use of Odoo by others companies, and collaborate in the development of new Odoo features.

This module is part of the Alliantum/odoo_public_modules project on GitHub.

You are welcome to contribute. To learn how please visit https://github.com/Alliantum/odoo_public_modules.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
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

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