summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Lesuisse <al@openerp.com>2010-03-22 06:10:19 +0100
committerAntony Lesuisse <al@openerp.com>2010-03-22 06:10:19 +0100
commit50005078fc6a0c1da2fc90e8a4bd7a52c3231bcc (patch)
treeb1eceac5ec414df94e1ca194e83185c451d0aa6c
parentb901634015dbf2e3decf808f3d031ea8f1b769de (diff)
mailgate fixes
bzr revid: al@openerp.com-20100322051019-x6zn4km8ldvnfgnl
-rwxr-xr-xaddons/crm/scripts/openerp_mailgate/openerp_mailgate.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
index 3b03c03d008..9db7e24acee 100755
--- a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
+++ b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
@@ -206,7 +206,7 @@ class email_parser(object):
# 'file_name':'file data',
# }
# }
-# #
+
def msg_body_get(self, msg):
message = {};
message['body'] = '';
@@ -215,7 +215,7 @@ class email_parser(object):
counter = 1;
def replace(match):
return ''
-
+
for part in msg.walk():
if part.get_content_maintype() == 'multipart':
continue
@@ -264,7 +264,7 @@ class email_parser(object):
body['body'] = body_data
data = {
- 'description': body['body'],
+# 'description': body['body'],
}
act = 'case_pending'
if 'state' in actions:
@@ -291,7 +291,7 @@ class email_parser(object):
self.rpc(self.model, act, [id])
self.rpc(self.model, 'write', [id], data)
- self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body'])
+ self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], body['body'])
return id
def msg_send(self, msg, emails, priority=None):
@@ -318,11 +318,11 @@ class email_parser(object):
body = message['body']
act = 'case_open'
self.rpc(self.model, act, [id])
- body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
- data = {
- 'description':body,
- }
- self.rpc(self.model, 'write', [id], data)
+ #body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n')))
+ #data = {
+ # 'description':body,
+ #}
+ #self.rpc(self.model, 'write', [id], data)
self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body'])
return id
@@ -397,4 +397,4 @@ if __name__ == '__main__':
parser.parse(msg_txt)
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: