How to do it...

In order to send a customized mail to the library members with overdue books, you will need to do the following:

  1. Find a member with a late document, and click on the Send message link in the chatter:
  1. Use the expand arrows in the top-right corner of the textbox to get the expanded composition interface.
  2. Type in the skeleton of the message as follows, and change the subject:
  1. Click on the Save as new template button. This will create a new template and link it into the Use template field.
  1. You can then click on the link to open and edit the new template:
  1. In that screen, replace Fabien with ${object.name}.
  2. Then, click on the Code View button (third button from the right in the preceding screenshot, displayed as </>).
  3. In the code view screen, locate the <ul> opening tag, which is the one in the bullet list of the late books and insert a line break before it and another line break after it (refer to step 12 for a screen capture).
  4. On the line before the opening li tag, insert the following text:
% for row in object.loan_ids:
  1. Inside the tag, replace the text Odoo Development Cookbook with ${row.book_id.name} (due on ${row.expected_return_date}.
  1. After the closing of the li tag, insert a line break and add the following line:
% endfor
  1. This is how it should look like:
  1. In the email configuration page, set the To (Emails) field to ${object.email}.
  2. Click on the Save button. You will get back to the email composition window, and the text will have been updated to use the expected return date of the document.
  3. You can click on Send to send the email.
  4. Next time you want to remind a member about late documents, you can select the mail template in the Use template field of the mail composition window.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.253.62