Tags

,


1). configure incoming mail server
33

2).Install Document Management System module

3). create a custom module (.py file)

from openerp.osv import fields,osv
from openerp import models
from openerp import tools
from openerp.tools.translate import _
from openerp.tools import email_re, email_split
from openerp.tools import html2plaintext


class incoming_mail_ep(osv.osv):
 _name="incoming.mail.ep"
 _inherit = ['mail.thread']
 _columns={
 'name': fields.char('Subject', required=True, select=1),
 'partner_name': fields.char("Customer Name", size=64,select=1),
 'email_from': fields.char('Email', size=128,required=True,select=1),
 'email_cc': fields.text('Global CC'),
 'user_id': fields.many2one('res.users', 'Salesperson',required=True),
 'partner_id': fields.many2one('res.partner', 'Partner',required=True,select=True),
 'description': fields.text('Description'),
 }
 def message_new(self, cr, uid, msg, custom_values=None, context=None):
 if custom_values is None:
 custom_values = {}
 defaults = {
 'name': msg.get('subject') or _("No Subject"),
 'email_from': msg.get('from'),
 'description': html2plaintext(msg.get('body')),
 'email_cc': msg.get('cc'),
 'partner_id': msg.get('author_id', False),
 'user_id': False,
 }
 return super(incoming_mail_ep, self).message_new(cr, uid, msg, custom_values=defaults, context=context)
Advertisements