diff --git a/addons/mail_gateway/__init__.py b/addons/mail_gateway/__init__.py index 2aefd8b3c11..7380514e45a 100644 --- a/addons/mail_gateway/__init__.py +++ b/addons/mail_gateway/__init__.py @@ -19,5 +19,7 @@ # ############################################################################## +import mail_gateway + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail_gateway/__openerp__.py b/addons/mail_gateway/__openerp__.py index a07a2595db8..b2d78324fe5 100644 --- a/addons/mail_gateway/__openerp__.py +++ b/addons/mail_gateway/__openerp__.py @@ -35,7 +35,7 @@ 'depends': ['smtpclient'], 'init_xml': [], 'update_xml': [ - + "mail_gateway_view.xml" ], 'demo_xml': [], 'installable': True, diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py new file mode 100644 index 00000000000..f267337125c --- /dev/null +++ b/addons/mail_gateway/mail_gateway.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL () +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see +# +############################################################################## + +from osv import osv, fields + +from osv import osv +from osv import fields + + +from osv import osv +from osv import fields + + +class mailgate_thread(osv.osv): + ''' + Mailgateway Thread + ''' + _name = 'mailgate.thread' + _description = 'Mailgateway Thread' + + _columns = { + 'name':fields.char('Name', size=64), + 'message_ids':fields.one2many('mailgate.message', 'thread_id', 'Message'), + } + +mailgate_thread() + +class mailgate_message(osv.osv): + ''' + Mailgateway Message + ''' + _name = 'mailgate.message' + _description = 'Mailgateway Message' + + _columns = { + 'name':fields.char('Message', size=64, required=True), + 'thread_id':fields.many2one('mailgate.thread', 'Thread'), + 'date': fields.datetime('Date'), + 'model_id': fields.many2one('ir.model', "Model"), + 'res_id': fields.integer('Resource ID'), + 'user_id': fields.many2one('res.users', 'User Responsible', readonly=True), + 'message': fields.text('Description'), + 'email_from': fields.char('Email From', size=84), + 'email_to': fields.char('Email To', size=84), + 'email_cc': fields.char('Email From', size=84), + 'email_bcc': fields.char('Email From', size=84), + 'message_id': fields.char('Message Id', size=1024, readonly=True, help="Message Id on Email Server.", select=True), + 'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel', 'message_id', 'attachment_id', 'Attachments'), + } + +mailgate_message() + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/mail_gateway/mail_gateway_view.xml b/addons/mail_gateway/mail_gateway_view.xml new file mode 100644 index 00000000000..253462895da --- /dev/null +++ b/addons/mail_gateway/mail_gateway_view.xml @@ -0,0 +1,131 @@ + + + + + maligate.message.form + maligate.message + form + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + maligate.message.tree + maligate.message + tree + + + + + + + + + + + mailgate.thread.form + mailgate.thread + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + mailgate.thread.tree + mailgate.thread + tree + + + + + + + + + + Mailgateway Threads + mailgate.thread + tree,form + form + + + + + + tree + + + + + + form + + + + + + + + + + +
+