Created
July 10, 2021 19:07
-
-
Save ray-odoo/93075785d363c1f36537aaa62993cce0 to your computer and use it in GitHub Desktop.
Add Details to Email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for record in records: | |
if record.model == 'project.task': | |
task = env['project.task'].search([('id','=',record.res_id)]) | |
new_body = "<dl><dt>Project: </dt><dd>%s</dd>" % task.project_id.display_name | |
new_body += "<dt>Customer: </dt><dd>%s</dd>" % task.partner_id.display_name | |
new_body += "<dt>Deadline: </dt><dd>%s</dd>" % (task.date_deadline and task.date_deadline or 'N/A') | |
record['body_html'] = record.body_html + new_body + "</dl>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment