diff options
| author | Thibault Delavallée <tde@openerp.com> | 2012-08-13 12:30:38 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2012-08-13 12:30:38 +0200 |
| commit | b479fbf64acbf507565b51e91ae828efb4e2ae28 (patch) | |
| tree | 3e0a7f933869c97660b3b81e1c00da5f551a3ab1 | |
| parent | fd471af0d8c76b9695beca87f8ccdecd64491ff4 (diff) | |
[IMP] mail_thread: continuing to translate hasattr to something else.
bzr revid: tde@openerp.com-20120813103038-4o1xwtsmjnvjj0b4
| -rw-r--r-- | addons/mail/mail_thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index a79b5a6475a..ea426327e10 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -330,7 +330,7 @@ class mail_thread(osv.Model): data = { 'subject': subject, - 'body_text': body_text or (hasattr(thread, 'description') and thread.description or ''), + 'body_text': body_text or thread._model._columns.get('description') and thread.description or ''), 'body_html': body_html or '', 'parent_id': parent_id, 'date': email_date or fields.datetime.now(), @@ -353,7 +353,7 @@ class mail_thread(osv.Model): data.update({ 'email_to': email_to, 'email_from': email_from or \ - (hasattr(thread, 'user_id') and thread.user_id and thread.user_id.user_email), + thread._model._columns.get('user_id') and thread.user_id and thread.user_id.user_email), 'email_cc': email_cc, 'email_bcc': email_bcc, 'references': references, |
