summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTurkesh Patel (Open ERP) <tpa@tinyerp.com>2012-05-14 10:42:06 +0530
committerTurkesh Patel (Open ERP) <tpa@tinyerp.com>2012-05-14 10:42:06 +0530
commit00fa501f3ec58491e2c69b4be7cca2f031bbc5a8 (patch)
tree925b0c0cac703d809e9253f4936366ff67b74b06
parente3c2694fb097fb897fd8e4a9469d6f3270638229 (diff)
[IMP] project_mailgate: remove message_id field and remove duplicate messages.
bzr revid: tpa@tinyerp.com-20120514051206-7plee6tvsqxqub9a
-rw-r--r--addons/project_mailgate/__openerp__.py1
-rw-r--r--addons/project_mailgate/project_mailgate.py39
-rw-r--r--addons/project_mailgate/project_mailgate_view.xml22
3 files changed, 1 insertions, 61 deletions
diff --git a/addons/project_mailgate/__openerp__.py b/addons/project_mailgate/__openerp__.py
index f2ac59c9fb1..028fbd8f807 100644
--- a/addons/project_mailgate/__openerp__.py
+++ b/addons/project_mailgate/__openerp__.py
@@ -46,7 +46,6 @@ There are two common alternatives to configure the mailbox integration:
""",
"init_xml": [],
"update_xml": ["security/ir.model.access.csv",
- "project_mailgate_view.xml",
],
'demo_xml': [
],
diff --git a/addons/project_mailgate/project_mailgate.py b/addons/project_mailgate/project_mailgate.py
index 9715a32c151..45ccbaf947c 100644
--- a/addons/project_mailgate/project_mailgate.py
+++ b/addons/project_mailgate/project_mailgate.py
@@ -26,12 +26,7 @@ import binascii
class project_tasks(osv.osv):
- _name = "project.task"
- _inherit = ['mail.thread','project.task']
-
- _columns = {
- 'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)], readonly=True),
- }
+ _inherit = 'project.task'
def message_new(self, cr, uid, msg, custom_values=None, context=None):
res_id = super(project_tasks,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
@@ -84,37 +79,5 @@ class project_tasks(osv.osv):
followers[task.id] = filter(None, task_followers)
return followers
- def do_draft(self, cr, uid, ids, context=None):
- res = super(project_tasks, self).do_draft(cr, uid, ids, context)
- tasks = self.browse(cr, uid, ids, context=context)
- self.message_append(cr, uid, tasks, _('Draft'), context=context)
- return res
-
- def do_open(self, cr, uid, ids, context=None):
- res = super(project_tasks, self).do_open(cr, uid, ids, context)
- tasks = self.browse(cr, uid, ids, context=context)
- self.message_append(cr, uid, tasks, _('Open'), context=context)
- return res
-
- def do_pending(self, cr, uid, ids, context=None):
- res = super(project_tasks, self).do_pending(cr, uid, ids, context)
- tasks = self.browse(cr, uid, ids, context=context)
- self.message_append(cr, uid, tasks, _('Pending'), context=context)
- return res
-
- def do_close(self, cr, uid, ids, context=None):
- res = super(project_tasks, self).do_close(cr, uid, ids, context)
- tasks = self.browse(cr, uid, ids, context=context)
- for task in tasks:
- if task.state == 'done':
- self.message_append(cr, uid, tasks, _('Done'), context=context)
- return res
-
- def do_cancel(self, cr, uid, ids, context=None):
- res = super(project_tasks, self).do_cancel(cr, uid, ids, context=context)
- tasks = self.browse(cr, uid, ids, context=context)
- self.message_append(cr, uid, tasks, _('Cancel'), context=context)
- return res
-
project_tasks()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_mailgate/project_mailgate_view.xml b/addons/project_mailgate/project_mailgate_view.xml
deleted file mode 100644
index ea9855e9ec1..00000000000
--- a/addons/project_mailgate/project_mailgate_view.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data>
- <record id="view_task_mailgate_form" model="ir.ui.view">
- <field name="name">task.mailgate.form</field>
- <field name="model">project.task</field>
- <field name="type">form</field>
- <field name="inherit_id" ref="project.view_task_form2"/>
- <field name="arch" type="xml">
- <xpath expr="//notebook/page[@string='Extra Info']" position="before">
- <page string="History">
- <field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
- <tree string="History">
- <field name="display_text" string="History Information"/>
- </tree>
- </field>
- </page>
- </xpath>
- </field>
- </record>
- </data>
-</openerp>