From 34f97ab271b10a5622d53d313f25614321cbd70e Mon Sep 17 00:00:00 2001
From: ced <>
Date: Thu, 11 Oct 2007 13:56:45 +0000
Subject: [PATCH] Better layout of form and add reply button
bzr revid: ced-4ef4945bd0ec737c9d3a8422cf8042296dd13486
---
addons/crm/crm.py | 9 ++++++++
addons/crm/crm_view.xml | 23 +++++++++++--------
.../tinyerp-mailgate/tinyerp-mailgate.py | 1 -
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index da55afc2fa4..f338f09ba0d 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -495,6 +495,15 @@ class crm_case(osv.osv):
)
return True
+ def add_reply(self, cursor, user, ids, context=None):
+ for case in self.browse(cursor, user, ids, context=context):
+ if case.history_line:
+ description = case.history_line[0].description
+ self.write(cursor, user, case.id, {
+ 'description': '> ' + description.replace('\n','\n> '),
+ }, context=context)
+ return True
+
def case_log(self, cr, uid, ids,context={}, email=False, *args):
cases = self.browse(cr, uid, ids)
self.__history(cr, uid, cases, 'Historize', history=True, email=email)
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 5b4a38260e4..3f6276e70f8 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -283,16 +283,6 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/scripts/tinyerp-mailgate/tinyerp-mailgate.py b/addons/crm/scripts/tinyerp-mailgate/tinyerp-mailgate.py
index 048a8d3c9eb..a4f15fcb55d 100755
--- a/addons/crm/scripts/tinyerp-mailgate/tinyerp-mailgate.py
+++ b/addons/crm/scripts/tinyerp-mailgate/tinyerp-mailgate.py
@@ -76,7 +76,6 @@ class email_parser(object):
message = self.msg_body_get(msg)
data = {
'name': self._decode_header(msg['Subject']),
- 'description': '> '+message['body'].replace('\n','\n> '),
'section_id': self.section_id,
'email_from': self._decode_header(msg['From']),
'email_cc': self._decode_header(msg['Cc'] or ''),