diff --git a/addons/project/project.py b/addons/project/project.py
index 812542cf768..fa27595196c 100644
--- a/addons/project/project.py
+++ b/addons/project/project.py
@@ -188,8 +188,6 @@ class project(osv.osv):
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of Projects."),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', help="Link this project to an analytic account if you need financial management on projects. It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc.", ondelete="cascade", required=True),
'priority': fields.integer('Sequence', help="Gives the sequence order when displaying the list of projects"),
- 'warn_manager': fields.boolean('Notify Manager', help="If you check this field, the project manager will receive an email each time a task is completed by his team.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
-
'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members',
help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'tasks': fields.one2many('project.task', 'project_id', "Task Activities"),
@@ -214,9 +212,6 @@ class project(osv.osv):
'project.task': (_get_projects_from_tasks, ['planned_hours', 'remaining_hours', 'work_ids', 'state'], 20),
}),
'resource_calendar_id': fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report", states={'close':[('readonly',True)]} ),
- 'warn_customer': fields.boolean('Warn Partner', help="If you check this, the user will have a popup when closing a task that propose a message to send by email to the customer.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
- 'warn_header': fields.text('Mail Header', help="Header added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
- 'warn_footer': fields.text('Mail Footer', help="Footer added at the beginning of the email for the warning message sent to the customer when a task is closed.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'type_ids': fields.many2many('project.task.type', 'project_task_type_rel', 'project_id', 'type_id', 'Tasks Stages', states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'task_count': fields.function(_task_count, type='integer', string="Open Tasks"),
'color': fields.integer('Color Index'),
@@ -914,28 +909,12 @@ class task(base_stage, osv.osv):
return True
def action_close(self, cr, uid, ids, context=None):
- """ This action closes the task, then opens the wizard to send an
- email to the partner or the project manager.
+ """ This action closes the task
"""
task_id = len(ids) and ids[0] or False
self._check_child_task(cr, uid, ids, context=context)
if not task_id: return False
- task = self.browse(cr, uid, task_id, context=context)
- project = task.project_id
- res = self.do_close(cr, uid, [task_id], context=context)
- if project.warn_manager or project.warn_customer:
- return {
- 'name': _('Send Email after close task'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'mail.compose.message',
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'nodestroy': True,
- 'context': {'active_id': task.id,
- 'active_model': 'project.task'}
- }
- return res
+ return self.do_close(cr, uid, [task_id], context=context)
def do_close(self, cr, uid, ids, context=None):
""" Compatibility when changing to case_close. """
diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml
index f685f14c85b..07951280dc7 100644
--- a/addons/project/project_demo.xml
+++ b/addons/project/project_demo.xml
@@ -286,14 +286,12 @@
- 1OpenERP Integration
- 110Study + Prototype
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 542ae3d085b..41bcef24f4f 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -84,31 +84,19 @@
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css
index 6718f8c92b3..ebab44e225a 100644
--- a/addons/project/static/src/css/project.css
+++ b/addons/project/static/src/css/project.css
@@ -1,6 +1,3 @@
-.oe_btn_width {
- width: 110px;
-}
.oe_kanban_project {
width: 300px;
}
diff --git a/addons/project/wizard/__init__.py b/addons/project/wizard/__init__.py
index f5324d2b6aa..7a9a734b2bd 100644
--- a/addons/project/wizard/__init__.py
+++ b/addons/project/wizard/__init__.py
@@ -19,7 +19,6 @@
#
##############################################################################
-import mail_compose_message
import project_task_delegate
import project_task_reevaluate
diff --git a/addons/project/wizard/mail_compose_message.py b/addons/project/wizard/mail_compose_message.py
deleted file mode 100644
index 1609cc04c1c..00000000000
--- a/addons/project/wizard/mail_compose_message.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2010-Today OpenERP SA ()
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU 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 General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-#
-##############################################################################
-
-from osv import osv
-from osv import fields
-from tools.translate import _
-
-class mail_compose_message(osv.osv_memory):
- _inherit = 'mail.compose.message'
-
- def get_value(self, cr, uid, model, resource_id, context=None):
- '''
- To get values of the resource_id for the model
- @param model: Object
- @param resource_id: id of a record for which values to be read
-
- @return: Returns a dictionary
- '''
- result = super(mail_compose_message, self).get_value(cr, uid, model, resource_id, context=context)
- if model == 'project.task' and resource_id:
- task_pool = self.pool.get('project.task')
- task_data = task_pool.browse(cr, uid, resource_id, context=context)
- partner = task_data.partner_id or task_data.project_id.partner_id
- if task_data.project_id.warn_manager and (not task_data.project_id.user_id or task_data.project_id.user_id and not task_data.project_id.user_id.user_email) :
- raise osv.except_osv(_('Error'), _("Please specify the Project Manager or email address of Project Manager."))
- elif task_data.project_id.warn_customer and (not partner or (partner and not partner.email)):
- raise osv.except_osv(_('Error'), _("Please specify the Customer or email address of Customer."))
-
- result.update({'email_from': task_data.user_id and task_data.user_id.user_email or False})
- val = {
- 'name': task_data.name,
- 'user_id': task_data.user_id.name,
- 'task_id': "%d/%d" % (task_data.project_id.id, task_data.id),
- 'date_start': task_data.date_start,
- 'date': task_data.date_end,
- 'state': task_data.state
- }
- header = (task_data.project_id.warn_header or '') % val
- footer = (task_data.project_id.warn_footer or '') % val
- description = u'%s\n %s\n %s\n\n \n%s' % (header, task_data.description or '', footer, task_data.user_id and task_data.user_id.signature)
- if partner :
- result.update({'email_to': result.get('email_to',False) and result.get('email_to') + ',' + partner.email})
- result.update({
- 'body_text': description or False,
- 'email_to': task_data.project_id.user_id and task_data.project_id.user_id.user_email or False,
- 'subject': _("Task '%s' Closed") % task_data.name,
- 'model': model,
- 'res_id': resource_id,
- })
-
- return result
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: