hooks/notification.py
changeset 3023 7864fee8b4ec
parent 2900 9d65e0350aa1
child 3072 6fb42c53f6df
equal deleted inserted replaced
2968:0e3460341023 3023:7864fee8b4ec
    45         rset = entity.related('wf_info_for')
    45         rset = entity.related('wf_info_for')
    46         view = self.select_view('notif_status_change', rset=rset, row=0)
    46         view = self.select_view('notif_status_change', rset=rset, row=0)
    47         if view is None:
    47         if view is None:
    48             return
    48             return
    49         comment = entity.printable_value('comment', format='text/plain')
    49         comment = entity.printable_value('comment', format='text/plain')
    50         if comment:
    50         # XXX don't try to wrap rest until we've a proper transformation (see
    51             comment = normalize_text(comment, 80,
    51         # #103822)
    52                                      rest=entity.comment_format=='text/rest')
    52         if comment and entity.comment_format != 'text/rest':
       
    53             comment = normalize_text(comment, 80)
    53         RenderAndSendNotificationView(self._cw, view=view, viewargs={
    54         RenderAndSendNotificationView(self._cw, view=view, viewargs={
    54             'comment': comment, 'previous_state': entity.previous_state.name,
    55             'comment': comment, 'previous_state': entity.previous_state.name,
    55             'current_state': entity.new_state.name})
    56             'current_state': entity.new_state.name})
    56 
    57 
    57 
    58