Managing the email alias
Email aliasing is the feature in Odoo that is used to create a record through incoming emails. The simplest example of an email alias is sales teams. You just need to send an email to sale@yourdomain.com
and Odoo will create a new record for crm.lead
in the sales team. In this recipe, we will create one email alias to create a book's borrowing record.
Getting ready
For this recipe, we will be using the my_library
module from the previous recipe, Sending emails using the QWeb template. We will create our email alias with the rent@yourdomain.com
email address. If you send an email to this email address with the book's name in the subject, a record is created in the library.book.rent
model.
How to do it...
Follow these steps to add an email alias for the library.book.rent
model:
- Add the email alias data in the
my_library/data/mail_template.xml
file:<record id="mail_alias_rent" model="mail.alias"> Â &...