diff --git a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReport_copyOrderPropertiesAndNotifyAssignee.xml b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReport_copyOrderPropertiesAndNotifyAssignee.xml index 7666e9cead453d622b29845044b499a145ee8f37..7df07bb3516c45f462b90342d1ce7cdda8032f3e 100644 --- a/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReport_copyOrderPropertiesAndNotifyAssignee.xml +++ b/bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/TaskReport_copyOrderPropertiesAndNotifyAssignee.xml @@ -85,12 +85,15 @@ destination_decision_person = task_report.getDestinationDecisionValue(portal_typ if destination_decision_person is None:\n destination_decision_person = task_report.getDestinationValue(portal_type="Person")\n \n -# We send a message only if the requester have an email and the assignee \n -# is an user that can view the task report.\n -if source_person is not None \\\n - and destination_decision_person is not None \\\n - and destination_decision_person.getDefaultEmailText() \\\n - and destination_decision_person.getReference():\n +# We send a message only if the requester has an email\n +# and the assignee has one too and is an user that can view the task report.\n +if (\n + source_person is not None and\n + source_person.getDefaultEmailText() and # XXX Add unit test: check if task confirmation works if assignee has no mail\n + destination_decision_person is not None and\n + destination_decision_person.getDefaultEmailText() and\n + destination_decision_person.getReference()\n + ):\n if len(portal.acl_users.erp5_users.getUserByLogin(source_person.getReference())):\n message = """A new task has been assigned to you by %(assignor)s.\n \n