← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~dreis-pt/project-service/7.0-issue_task-dr into lp:project-service

 

Daniel Reis has proposed merging lp:~dreis-pt/project-service/7.0-issue_task-dr into lp:project-service.

Requested reviews:
  Project Core Editors (project-core-editors)

For more details, see:
https://code.launchpad.net/~dreis-pt/project-service/7.0-issue_task-dr/+merge/195985

Module to "Use Tasks to support Issue resolution reports".
Simplifies and replaces the former v6 "project_issue_service" and "project_task_service".
-- 
https://code.launchpad.net/~dreis-pt/project-service/7.0-issue_task-dr/+merge/195985
Your team Project Core Editors is requested to review the proposed merge of lp:~dreis-pt/project-service/7.0-issue_task-dr into lp:project-service.
=== removed file 'project_issue_service/board_project_view.xml'
--- project_issue_service/board_project_view.xml	2012-11-22 13:29:38 +0000
+++ project_issue_service/board_project_view.xml	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-    <data>
-
-    <record id="project.action_project_vs_remaining_hours_graph" model="ir.actions.act_window">
-        <!-- Exclude admin's projects from graph -->
-        <field name="domain">[('user_id','!=',1),('user_id','=',uid),('state','=','open')]</field>
-    </record>
-    
-    </data>
-</openerp>
-    
\ No newline at end of file

=== removed file 'project_issue_service/project_issue_workflow.xml'
--- project_issue_service/project_issue_workflow.xml	2012-11-22 13:29:38 +0000
+++ project_issue_service/project_issue_workflow.xml	1970-01-01 00:00:00 +0000
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
-    <data>
-        <record model="workflow" id="wkf_project_issue">
-            <field name="name">Project Issue Workflow</field>
-            <field name="osv">project.issue</field>
-            <field name="on_create">True</field>
-        </record>
-
-        <record model="workflow.activity" id="act_draft">
-            <field name="wkf_id" ref="wkf_project_issue"/>
-            <field name="flow_start">True</field>
-            <field name="name">draft</field>
-            <field name="kind">function</field>
-            <field name="action">write({'state': 'draft'})
-do_routing()</field>
-        </record>
-
-        <record model="workflow.activity" id="act_open">
-            <field name="wkf_id" ref="wkf_project_issue"/>
-            <field name="name">open</field>
-            <field name="kind">function</field>
-            <field name="action">write({'state': 'open'})
-do_routing()</field>
-        </record>
-
-        <record model="workflow.activity" id="act_pending">
-            <field name="wkf_id" ref="wkf_project_issue"/>
-            <field name="name">pending</field>
-            <field name="kind">function</field>
-            <field name="action">write({'state': 'pending'})</field>
-        </record>
-
-        <record model="workflow.activity" id="act_done">
-            <field name="wkf_id" ref="wkf_project_issue"/>
-            <field name="name">done</field>
-            <field name="kind">function</field>
-            <field name="action">write({'state': 'done'})</field>
-            <field name="flow_stop">True</field>
-        </record>
-
-        <record model="workflow.activity" id="act_cancel">
-            <field name="wkf_id" ref="wkf_project_issue"/>
-            <field name="name">cancel</field>
-            <field name="kind">function</field>
-            <field name="action">write({'state': 'cancel'})</field>
-            <field name="flow_stop">True</field>
-        </record>
-
-
-<!-- == TRANSITIONS ==  -->
-        <!-- DRAFT -->
-        <record model="workflow.transition" id="t_draft2cancel">
-            <field name="act_from" ref="act_draft"/>
-            <field name="act_to" ref="act_cancel"/>
-            <field name="signal">case_cancel</field>
-        </record>
-        <record model="workflow.transition" id="t_draft2open">
-            <field name="act_from" ref="act_draft"/>
-            <field name="act_to" ref="act_open"/>
-            <field name="signal">case_open</field>
-        </record>
-
-        <!-- OPEN -->
-        <record model="workflow.transition" id="t_open2done">
-            <field name="act_from" ref="act_open"/>
-            <field name="act_to" ref="act_done"/>
-            <field name="signal">case_close</field>
-        </record>
-        <record model="workflow.transition" id="t_open2pending">
-            <field name="act_from" ref="act_open"/>
-            <field name="act_to" ref="act_pending"/>
-            <field name="signal">case_pending</field>
-        </record>
-        <record model="workflow.transition" id="t_open2cancel">
-            <field name="act_from" ref="act_open"/>
-            <field name="act_to" ref="act_cancel"/>
-            <field name="signal">case_cancel</field>
-        </record>
-
-        <!-- PENDING -->
-        <record model="workflow.transition" id="t_pending2open">
-            <field name="act_from" ref="act_pending"/>
-            <field name="act_to" ref="act_open"/>
-            <field name="signal">case_open</field>
-        </record>
-
-        <!-- not valid
-        <record model="workflow.transition" id="t_done2draft">
-            <field name="act_from" ref="act_done"/>
-            <field name="act_to" ref="act_draft"/>
-            <field name="signal">case_reset</field>
-        </record>
-        <record model="workflow.transition" id="t_cancel2draft">
-            <field name="act_from" ref="act_cancel"/>
-            <field name="act_to" ref="act_draft"/>
-            <field name="signal">case_reset</field>
-        </record>
-        -->
-
-    </data>
-</openerp>
-
-
-
-
-
-

=== removed directory 'project_issue_service/static'
=== removed directory 'project_issue_service/static/src'
=== removed directory 'project_issue_service/static/src/img'
=== removed file 'project_issue_service/static/src/img/icon.png'
Binary files project_issue_service/static/src/img/icon.png	2012-11-22 13:29:38 +0000 and project_issue_service/static/src/img/icon.png	1970-01-01 00:00:00 +0000 differ
=== removed directory 'project_issue_service/wizard'
=== removed file 'project_issue_service/wizard/__init__.py'
--- project_issue_service/wizard/__init__.py	2012-11-22 13:29:38 +0000
+++ project_issue_service/wizard/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-import project_task_reevaluate

=== removed file 'project_issue_service/wizard/project_task_reevaluate.py'
--- project_issue_service/wizard/project_task_reevaluate.py	2012-11-22 13:29:38 +0000
+++ project_issue_service/wizard/project_task_reevaluate.py	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    Copyright (C) 2012 Daniel Reis
-#
-#    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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-from osv import fields, osv
-from tools.translate import _
-
-class project_task_reevaluate(osv.osv_memory):
-    _inherit = 'project.task.reevaluate'
-
-    def compute_hours(self, cr, uid, ids, context=None):
-        """
-        Reevaluate relinks the Issue's current Task
-        """
-        task_pool  = self.pool.get('project.task')
-        issue_pool = self.pool.get('project.issue')
-        for o in task_pool.browse(cr, uid, context.get('active_ids', list()), context=context):
-            if o.issue_id and not o.issue_id.task_id:
-                issue_pool.write(cr, uid, [o.issue_id.id], {'task_id': o.id}, context=context)  
-        return super(project_task_reevaluate, self).compute_hours(cr, uid, ids, context)
-project_task_reevaluate()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== renamed directory 'project_issue_service' => 'project_issue_task'
=== modified file 'project_issue_task/__init__.py' (properties changed: +x to -x)
--- project_issue_service/__init__.py	2012-11-22 13:29:38 +0000
+++ project_issue_task/__init__.py	2013-11-20 17:31:26 +0000
@@ -1,5 +1,4 @@
 # -*- coding: utf-8 -*-
 import project_issue
+import project_task_cause
 import project_task
-import wizard
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'project_issue_task/__openerp__.py' (properties changed: +x to -x)
--- project_issue_service/__openerp__.py	2013-05-09 13:35:42 +0000
+++ project_issue_task/__openerp__.py	2013-11-20 17:31:26 +0000
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
 #
-#    Copyright (C) 2012 Daniel Reis
+#    Copyright (C) 2012 - 2013 Daniel Reis
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -19,41 +19,34 @@
 ##############################################################################
 
 {
-    'name': 'Project Issue and Task integration',
+    'name': 'Project Issue related Tasks',
+    'summary': 'Use Tasks to support Issue resolution reports',
     'version': '1.1',
     'category': 'Project Management',
     'description': """\
-Integrate Issues and Tasks in a common workflow, as is common in service management scenarios.
-
-1. End user creates new Issue
-2. Service Desk User reviews the new Issue:
-    If a technical person intervention is needed, creates a Task for it.
-    If not, it's closed without the need for an intervention Task.
-3. Service Team User schedules the new Task
-4. Service Team User completes the Task. The issue is automatically closed.
-
-CHANGE LOG
-============
-1.1    Reference sequence (`ref` field) moved to module `project_issue_sequences`.
-
+Support for the use case where solving an Issue means a Task should be done,
+such as an on site visit, and a report must be made to document the work done.
+This is a common scenario in technical field services.
+
+The Issue form already has a "Task" field, allowing to create a Task related
+to an Issue.
+This module adds some usability improvements:
+
+  * "Create Task" button on the Issue form
+  * Automaticaly Close the Issue when the Task is Closed
+  * Automatically Cancel the Task when Issue is Cancelled
+  * Make the Task also visible to all followers of the related Issue
 """,
     'author': 'Daniel Reis',
-    'website': 'daniel.reis@xxxxxxxxxxxx',
     'depends': [
-        'project', 'project_functional_blocks',
         'project_issue',
-        'project_issue_department',
-        'project_issue_sequences',
-        'crm_categ_hierarchy',
-        'crm',
         ],
     'update_xml': [
         'project_issue_view.xml',
+        'project_task_cause_view.xml',
         'project_task_view.xml',
-        'board_project_view.xml',
-        #'project_issue_workflow.xml', #<= not using it, to avoid migrating former Issues to the new workflow
+        'security/ir.model.access.csv',
+        'security/project_security.xml',
         ],
-    'installable': False,
-    'application': True,
+    'installable': True,
 }
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added directory 'project_issue_task/i18n'
=== added file 'project_issue_task/i18n/project_issue_task.pot'
--- project_issue_task/i18n/project_issue_task.pot	1970-01-01 00:00:00 +0000
+++ project_issue_task/i18n/project_issue_task.pot	2013-11-20 17:31:26 +0000
@@ -0,0 +1,97 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* project_issue_task
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-20 15:02+0000\n"
+"PO-Revision-Date: 2013-11-20 15:02+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:38
+#, python-format
+msgid "Report for %s"
+msgstr ""
+
+#. module: project_issue_task
+#: view:project.issue:0
+msgid "Task Report"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task.cause,code:0
+msgid "Code"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task.cause,description:0
+msgid "Description"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task,ref:0
+msgid "Reference"
+msgstr ""
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_issue
+msgid "Project Issue"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task.cause,sequence:0
+msgid "Sequence"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task,reason_id:0
+msgid "Problem Cause"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task,issue_id:0
+msgid "Related Issue"
+msgstr ""
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_task
+msgid "Task"
+msgstr ""
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:33
+#, python-format
+msgid "A Task is already assigned to the Issue!"
+msgstr ""
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_task_cause
+msgid "Issue Cause"
+msgstr ""
+
+#. module: project_issue_task
+#: field:project.task.cause,name:0
+msgid "Cause"
+msgstr ""
+
+#. module: project_issue_task
+#: model:ir.actions.act_window,name:project_issue_task.open_task_cause_form
+#: model:ir.ui.menu,name:project_issue_task.menu_task_cause_view
+#: view:project.task.cause:0
+msgid "Task Issue Causes"
+msgstr ""
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:46
+#, python-format
+msgid "Issue Task Report"
+msgstr ""
+

=== added file 'project_issue_task/i18n/pt.po'
--- project_issue_task/i18n/pt.po	1970-01-01 00:00:00 +0000
+++ project_issue_task/i18n/pt.po	2013-11-20 17:31:26 +0000
@@ -0,0 +1,97 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#	* project_issue_task
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-11-20 15:02+0000\n"
+"PO-Revision-Date: 2013-11-20 15:02+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:38
+#, python-format
+msgid "Report for %s"
+msgstr "Relatório de %s"
+
+#. module: project_issue_task
+#: view:project.issue:0
+msgid "Task Report"
+msgstr "Relatório de Intervenção"
+
+#. module: project_issue_task
+#: field:project.task.cause,code:0
+msgid "Code"
+msgstr "Código"
+
+#. module: project_issue_task
+#: field:project.task.cause,description:0
+msgid "Description"
+msgstr "Descrição"
+
+#. module: project_issue_task
+#: field:project.task,ref:0
+msgid "Reference"
+msgstr "Referência"
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_issue
+msgid "Project Issue"
+msgstr "Incidente"
+
+#. module: project_issue_task
+#: field:project.task.cause,sequence:0
+msgid "Sequence"
+msgstr "Sequência"
+
+#. module: project_issue_task
+#: field:project.task,reason_id:0
+msgid "Problem Cause"
+msgstr "Causa do problema"
+
+#. module: project_issue_task
+#: field:project.task,issue_id:0
+msgid "Related Issue"
+msgstr "Relativo ao Incidente"
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_task
+msgid "Task"
+msgstr "Tarefa"
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:33
+#, python-format
+msgid "A Task is already assigned to the Issue!"
+msgstr "O Incidente já tem uma Tarefa associada!"
+
+#. module: project_issue_task
+#: model:ir.model,name:project_issue_task.model_project_task_cause
+msgid "Issue Cause"
+msgstr "Causa do Incidente"
+
+#. module: project_issue_task
+#: field:project.task.cause,name:0
+msgid "Cause"
+msgstr "Causa"
+
+#. module: project_issue_task
+#: model:ir.actions.act_window,name:project_issue_task.open_task_cause_form
+#: model:ir.ui.menu,name:project_issue_task.menu_task_cause_view
+#: view:project.task.cause:0
+msgid "Task Issue Causes"
+msgstr "Causas para Tarefas"
+
+#. module: project_issue_task
+#: code:addons/project_issue_task/project_issue.py:46
+#, python-format
+msgid "Issue Task Report"
+msgstr "Relatório de Intervenção"
+

=== modified file 'project_issue_task/project_issue.py' (properties changed: +x to -x)
--- project_issue_service/project_issue.py	2013-01-03 11:34:54 +0000
+++ project_issue_task/project_issue.py	2013-11-20 17:31:26 +0000
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
-#    Copyright (C) 2012 Daniel Reis
+#
+#    Copyright (C) 2012 - 2013 Daniel Reis
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -18,147 +18,46 @@
 #
 ##############################################################################
 
-from osv import fields, osv
+from openerp.osv import orm
 from tools.translate import _
-from datetime import datetime, timedelta
-import time
-
-
-class project_issue(osv.osv):
+
+
+class project_issue(orm.Model):
     _inherit = 'project.issue'
-    _columns = {
-    #added fields:
-        'functional_block_id': fields.many2one('project.functional_block', 'Component', help = "Component (system, module, function) to be adressed"),
-        'assigned_to': fields.related('task_id', 'user_id', string = 'Task Assigned to', type="many2one", relation="res.users", store=True, help='This is the current user to whom the related task was assigned'),
-        'tasks': fields.one2many('project.task', 'issue_id', 'Related tasks', help="Task history for the issue"),
-        'create_uid': fields.many2one('res.users', 'Created by', help = "Person who reported the issue"),
-    #modified fields:
-        'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, 
-            domain="[('object_id.model','=','project.issue')]",
-            help="Only categories with a parent will be selectable in the Issues form."),
-    }
-
-    def case_open(self, cr, uid, ids, *args):
-        """Open Issue preserving the assigned user_id.
-        Standard project_issue.case_open() method forces user_id to the current user.
-        This is not appropriate in the case where an administrative user is updating issue status.
-        With this enhancement, the original user_id is preserved.
-        """
-        orig = self.read(cr, uid, ids, ['id', 'user_id'])
-        res = super(project_issue, self).case_open(cr, uid, ids, *args)
-        for rec in orig:
-            if rec['user_id'] and rec['user_id'][0]:
-                #Write both 'user_id' and 'date_open' to allow Action Rule Triggers to ignore these changes using "... and not vals.get('date_open')"
-                self.write(cr, uid, [rec['id']], {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'user_id' : rec['user_id'][0]} )
-        return res
-
-    def _validate_tasks_inactive(self, cr, uid, ids):
-        """Ensure there are no related active Tasks""" 
-        for issue in self.browse(cr, uid, ids):
-            for task in issue.tasks:
-                if task.state not in ['done', 'cancel']: 
-                    raise osv.except_osv(_('Error !'), _('All related tasks should be inactive. Please check Task "%s".' % task.name))
-
-    def case_cancel(self, cr, uid, ids, *args):
-        self._validate_tasks_inactive(cr, uid, ids)
-        return super(project_issue, self).case_cancel(cr, uid, ids, *args)
-
-    def case_close(self, cr, uid, ids, *args):
-        self._validate_tasks_inactive(cr, uid, ids)
-        return super(project_issue, self).case_close(cr, uid, ids, *args)
-
-    def onchange_partner_id(self, cr, uid, ids, part, email=False, proj_id=None, context=None):
-        """This function returns value of partner address based on partner
-        :param ids: List of case IDs
-        :param part: Partner's id
-        :param email: Partner's email ID
-        """
-        #the Issue Address is copied from the project's Contact Address
-        if  proj_id:
-            data = {}
-            proj_obj = self.pool.get('project.project').browse(cr, uid, proj_id, context)
-            #Copy address from Project
-            contact_id = proj_obj.contact_id and proj_obj.contact_id.id or None
-            data.update( {'partner_address_id': contact_id} )
-            #Copy "reply_to" email from Project, if none already provided
-            if not email:
-                email = proj_obj.reply_to
-                if email:
-                    data.update({'email_from': email})
-            return {'value': data}
-        #else:
-        return super(project_issue, self).onchange_partner_id(cr, uid, ids, part, email)        
-        
-    def on_change_project(self, cr, uid, ids, proj_id=False, context=None):
-        """When changing the Issue's Project:
-            - the Issue Partner is copied from the project's Partner
-            - cascades the change to the Address and e-mail
-        """
-        if not proj_id:
-            return {'value':{}}
-        super_res = super(project_issue, self).on_change_project(cr, uid, ids, proj_id, context = context)
-        data = super_res.get('value', {})
-        #the Issue Partner is copied from the project's Partner
-        proj_obj = self.pool.get('project.project').browse(cr, uid, proj_id, context)
-        if proj_obj.partner_id:
-            data.update( {'partner_id': proj_obj.partner_id.id} )
-        #the Issue Address is copied from the project's Contact Address
-        #TODO: code repeated in onchange_partner_id(); check if it's really necessary
-        contact_id = proj_obj.contact_id and proj_obj.contact_id.id or None
-        data.update( {'partner_address_id': contact_id} )
-        #cascades the change to the Address and e-mail
-        data.update( self.onchange_partner_id(cr, uid, ids, None, proj_id)['value'] )
-        return {'value': data}
-
-    def convert_issue_task(self, cr, uid, ids, context=None):
-        for bug in self.browse(cr, uid, ids, context=context):
-            if bug.task_id:
-                new_task_id  = bug.task_id.id
-            else:
-                #Task,user_id must be current user; otherwise Task Access Rules may stop task.create
-                #Task date start defaults to tomorrow 00:00h
-                now = datetime.now()
-                date_start = datetime( now.year, now.month, now.day, 0) + timedelta(days=+1)
-                new_task_id = self.pool.get('project.task').create(cr, uid, {
-                    'section_id': bug.section_id.id,
-                    'project_id': bug.project_id.id,
-                    'partner_id': bug.partner_id.id,
-                    'categ_id': bug.categ_id.id,
-                    'functional_block_id': bug.functional_block_id.id,
-                    'date_deadline': bug.date_deadline,
-                    'date_start': date_start, #changed from standard
-                    'planned_hours': 1, #added
-                    'name': bug.name,
-                    'description':bug.description,
-                    'issue_id': bug.id, #added
-                    'priority': bug.priority,
-                    'user_id': uid, #changed
-                })
-                self.write(cr, uid, [bug.id], {'task_id': new_task_id})
-                self.case_open(cr, uid, [bug.id])
-
-        data_obj = self.pool.get('ir.model.data')
-        form_id = data_obj.get_object(cr, uid, 'project', 'view_task_form2').id
-        tree_id = data_obj.get_object(cr, uid, 'project', 'view_task_tree2').id
-        srch_id = data_obj.get_object(cr, uid, 'project', 'view_task_search_form').id
-        return  {
-            'name': _('Tasks'),
+
+    def action_create_task(self, cr, uid, ids, context=None):
+        """
+        Create and a related Task for the visit report, and open it's Form.
+        """
+        rec = self.browse(cr, uid, ids[0], context)
+        assert not rec.task_id, _("A Task is already assigned to the Issue!")
+
+        rec_fields = ['project_id', 'analytic_account_id', 'location_id']
+        task_data = {x: getattr(rec, x).id for x in rec_fields
+                     if hasattr(rec, x) and getattr(rec, x)}
+        task_data['name'] = _('Report for %s') % rec.name
+        task_data['issue_id'] = rec.id
+        task_data['categ_ids'] = [(6, 0, [x.id for x in rec.categ_ids])]
+
+        task_model = self.pool.get('project.task')
+        task_id = task_model.create(cr, uid, task_data, context=context)
+        rec.write({'task_id': task_id}, context=context)
+        res = {
+            'name': _('Issue Task Report'),
             'view_type': 'form',
-            'view_mode': 'form,tree', 
+            'view_mode': 'form',
             'res_model': 'project.task',
-            'res_id': int(new_task_id),
-            'view_id': False,
-            'views': [(form_id,'form'),(tree_id,'tree'),(False,'calendar'),(False,'graph')],
+            'res_id': task_id,
             'type': 'ir.actions.act_window',
-            'search_view_id': srch_id,
-            'nodestroy': True
-        }
-
-    def convert_issue_task_tree(self, cr, uid, ids, context=None):
-        """Create Task from Issue, without opening it's form"""
-        self.convert_issue_task(cr, uid, ids, context=context)
-        return True
-
-project_issue()
-    
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+            }
+        return res
+
+    def case_cancel(self, cr, uid, ids, context=None):
+        """ On Issue Cancel, also Cancel Task """
+        task_ids = [issue.task_id.id
+                    for issue in self.browse(cr, uid, ids, context=context)
+                    if issue.task_id]
+        self.pool.get('project.task').case_cancel(
+            cr, uid, task_ids, context=context)
+        return super(project_issue, self).case_cancel(
+            cr, uid, ids, context=context)

=== modified file 'project_issue_task/project_issue_view.xml' (properties changed: +x to -x)
--- project_issue_service/project_issue_view.xml	2012-12-20 12:06:22 +0000
+++ project_issue_task/project_issue_view.xml	2013-11-20 17:31:26 +0000
@@ -1,174 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
 <openerp>
     <data>
-        
+
         <!--PROJECT ISSUE FORM -->
-        <record id="project_issue_form_view_dreis" model="ir.ui.view">
-            <field name="name">project_issue_form_view_dreis</field>
+        <record id="project_issue_form_view_task" model="ir.ui.view">
+            <field name="name">project_issue_form_view_task</field>
             <field name="model">project.issue</field>
             <field name="inherit_id" ref="project_issue.project_issue_form_view"/>
             <field name="arch" type="xml">
 
-                <field name="categ_id" position="replace"/>
-                <field name="name" position="replace">
-                    <field name="name" colspan="4"/>
-                    <field name="functional_block_id" select="1" required="1" widget="selection"/>
-                    <field name="categ_id" widget="selection" domain="[('object_id.model','=','project.issue')]"/>
-                        <!--... domain="[('object_id.model', '=', 'project.issue'),('parent_id','!=',None)]" -->
-                    <field name="create_uid" readonly="1"/>
-                </field>
-                <field name="project_id" position="attributes">
-                    <attribute name="colspan">4</attribute>
-                </field>
-                
-                <field name="version_id" position="attributes">
-                    <attribute name="groups">base.group_extended</attribute>
-                </field>
-
-                <!-- Partner Address: add domain -->
-                <field name="partner_id" position="replace">
-                    <field name="partner_id"  on_change="onchange_partner_id(partner_id, email_from, project_id)" required="1"/>
-                </field>
-                <field name="partner_address_id" position="replace">
-                    <field name="partner_address_id"  string="Address" required="1" 
-                           on_change="onchange_partner_address_id(partner_address_id, email_from)"
-                           domain="[('partner_id','=',partner_id)]"/>
-                </field>
-                <field name="priority" position="after">
-                    <field name="section_id" string="Service Team" groups="base.group_extended"/>
-                </field>
-
-                <!-- Create task Button -->
-                <field name="task_id" position="attributes">
-                    <attribute name="string">Current Task</attribute>
-                </field>
-                <xpath expr='//button[@name="convert_issue_task"]' position="replace">
-                    <button name="convert_issue_task" string="Create Task" icon="gtk-index" type="object" attrs="{'invisible':['|',('task_id','!=',False), ('state','in',['cancel','done'])]}"/>
-                </xpath>
-                
-                <!-- Modify existing buttons -->
-                <button name="case_cancel" position="attributes">
-                    <attribute name="states">draft,open</attribute>
-                    <!--attribute name="type">workflow</attribute-->
-                </button>
-                <button name="case_open" position="attributes">
-                    <attribute name="states">draft,pending</attribute>
-                    <!--attribute name="type">workflow</attribute-->
-                </button>
-                <button name="case_pending" position="attributes">
-                    <attribute name="states">open</attribute>
-                    <!--attribute name="type">workflow</attribute-->
-                </button>
-                <button name="case_close" position="attributes">
-                    <attribute name="states">open</attribute>
-                    <!--attribute name="type">workflow</attribute-->
-                </button>
-                <!-- button name="case_reset" position="replace"/> -->
-                
-                <xpath expr='//page[@string="Communication &amp; History"]' position="attributes">
-                    <attribute name="groups"/>
-                </xpath>
-                <!-- ###BUG https://bugs.launchpad.net/openobject-addons/+bug/944879 -->
-                <field name="email_cc" position="attributes">
-                    <attribute name="widget">email</attribute>
-                </field>
-
-                 <!-- Task History tab-->
-                 <xpath expr='//page[@string="Extra Info"]' position="before">
-                    <page string="Task History">
-                        <field name="tasks" nolabel="1" readonly="1"/>
-                    </page>
-                 </xpath>
-                
-            </field>
-        </record>
-
-        <!--PROJECT ISSUE SEARCH -->
-        <record id="view_project_issue_filter_dreis" model="ir.ui.view">
-            <field name="name">Project Issue Tracker Search</field>
-            <field name="model">project.issue</field>
-            <field name="inherit_id" ref="project_issue.view_project_issue_filter"/>
-            <field name="arch" type="xml">
-
-                   <!-- "To-Do" button relabeled to "In Progress" -->
-                   <filter name="todo" position="attributes">
-                           <attribute name="string">Open</attribute>
-                   </filter>
-                    <!--  name filter -->
-                    <field name="name" position="replace">
-                        <field name="name" string="Issue" colspan="2"
-                               filter_domain="['|','|','|',('project_id','ilike',self), ('partner_id','ilike',self), ('email_from','ilike',self), ('name','ilike',self)]"
-                        />
-                    </field>
-                    <!--  user_id buttons with same order as Tasks  (BUGFIX to report) -->
-                    <field name="user_id" position="replace">
-                        <field name="user_id" filter_domain="['|',('user_id','=',self),('create_uid','=',self)]" string="User">
-                            <filter domain="['|',('user_id','=',uid),('create_uid','=',uid)]"  help="My Issues" icon="terp-personal" />
-                            <filter domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-" groups="project.group_project_manager"/>
-                        </field>
-                    </field>
-                    <field name="project_id" position="replace"/>
-
-                    <!-- Search by "ref" instead of "id"; add section_id (Team) -->
-                    <field name="id" position="replace">
-                        <field name="section_id" string="Team" widget="selection" groups="base.group_extended"/>
-                    </field>
-                    <!--  GROUP BY -->
-                    <filter string="Partner" position="after">
-                        <filter string="Team" icon="STOCK_SELECT_COLOR" domain="[]" context="{'group_by':'section_id'}"/>
-                    </filter>
-            </field>
-        </record>
-
-        <!--PROJECT ISSUE TREE -->
-        <record model="ir.ui.view" id="project_issue_tree_view_reis">
-            <field name="name">Project Issue Tracker Tree</field>
-            <field name="model">project.issue</field>
-            <field name="inherit_id" ref="project_issue.project_issue_tree_view"/>
-            <field name="arch" type="xml">
-              <data>
-                <!-- Colors like Task Tree -->
-                <!-- TODO: red for surpassed dealines  -->
-                <tree position="attributes">
-                      <attribute name="colors">grey:state in ('cancel','done');blue:state == 'pending'</attribute>
-                </tree>
-                <!-- Internal ID, Version and Stage visible only in Extended mode -->
-                <field name="id" position="attributes"><attribute name="invisible">1</attribute></field>
-                <field name="type_id" position="attributes"><attribute name="groups">base.group_extended</attribute></field>
-                <button name="prev_type" position="attributes"><attribute name="groups">base.group_extended</attribute></button>
-                <button name="next_type" position="attributes"><attribute name="groups">base.group_extended</attribute></button>
-                <field name="version_id" position="attributes"><attribute name="groups">base.group_extended</attribute></field>
-                <field name="categ_id" position="attributes"><attribute name="groups">base.group_extended</attribute></field>
-                <!-- Ref and Category visible after issue name -->
-                <field name="user_id" position="after">
-                    <field name="section_id" groups="base.group_extended"/>
-                    <field name="create_uid"/>
-                </field>
-                <!-- State buttons equal to Task Tree -->
-                <button name="case_cancel" position="replace"/>
-                <button name="case_close" position="replace"/>
-                <button name="case_pending" position="replace"/>
-                <button name="case_escalate" position="replace"/>
-                <button name="case_reset" position="replace"/>
-                <button name="case_open" position="replace">
-                    <button name="convert_issue_task_tree" string="Create Task" icon="gtk-index" type="object" 
-                            attrs="{'invisible':['|',('task_id','!=',False), ('state','in',['cancel','done'])]}"/>
-                    <button name="case_open" string="Open" states="draft,pending" type="object" 
-                            icon="gtk-media-play" help="Moves to state In Progress" groups="base.group_extended"/>
-                    <button name="case_close" string="Done" states="open" type="object"  
-                            icon="terp-dialog-close"/>
-                </button>
-
-              </data>
-            </field>
-        </record>
-
-    <!-- ISSUE KANBAN VIEW: moving from first to last position-->
-    <record model="ir.actions.act_window.view" id="project_issue.action_crm_tag_kanban_view0">
-        <field name="sequence" eval="10"/>
-    </record>
-    <!-- -->
+               <field name="task_id" position="after">
+                    <button type="object" name="action_create_task" string="Task Report" attrs="{'invisible': [('task_id', '!=', False)]}"/>
+               </field>
+
+            </field>
+        </record>
 
     </data>
 </openerp>
-

=== modified file 'project_issue_task/project_task.py' (properties changed: +x to -x)
--- project_issue_service/project_task.py	2012-11-22 13:29:38 +0000
+++ project_issue_task/project_task.py	2013-11-20 17:31:26 +0000
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
-#    Copyright (C) 2012 Daniel Reis
+#
+#    Copyright (C) 2012 - 2013 Daniel Reis
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -18,74 +18,23 @@
 #
 ##############################################################################
 
-from crm import crm
-from osv import fields, osv
-from datetime import datetime, timedelta
-
-###TASK_TYPE_USE_GROUPS = [('resolution', 'Resolution Stage'), ('cause', 'Problem Cause')]
-
-#class project_task_type(osv.osv):
-#    _inherit = 'project.task.type'
-#    _sort = 'use_group, sequence'
-#    _columns = {
-#        'use_group': fields.selection( TASK_TYPE_USE_GROUPS , 'Usage', size=16),
-#        'code': fields.char('Code', size=10),
-#    }
-#project_task_type()
-
-
-#class project_functional_block(osv.osv):
-#    _inherit = 'project.functional_block'
-#    _columns = {
-#        'code': fields.char('Code', size=10),
-#    }
-#project_functional_block()
-
-class task(osv.osv):
+from openerp.osv import fields, orm
+
+
+class task(orm.Model):
     _inherit = "project.task"
     _columns = {
-        #modified fields:
-        'section_id': fields.many2one('crm.case.section', 'Service Team', select=True,\
-            help='Service team to which Task belongs to.'), #standard: relabeled
-        'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), #Standard is 0-4; changed to conform with project_issue (1-5)!
-        #added fields:
-        'issue_id': fields.many2one('project.issue', 'Related Issue', readonly=True, 
-            help="Issue related to this task"),
-        'categ_id': fields.related('issue_id', 'categ_id', string='Issue Category', type="many2one", relation='crm.case.categ', store=True),
-    }
-        
-    def do_close(self, cr, uid, ids, context=None):
-        """
-        Clean up related Issues's 'Current Task', and set issue state to either
-        'done' or 'pending', if pending work is described in the 'todo_desc' field.
-        """
-        #Tasks must be closed first, because Issues with active tasks can't be closed
-        res = super(task, self).do_close(cr, uid, ids, context)
-        #Update related issue state
-        issue_model = self.pool.get('project.issue')
-        for tsk in self.browse(cr, uid, ids):
-            if tsk.issue_id and tsk.issue_id.state not in ['done', 'cancel']:
-                #Current task cleaned up, so that the "Create Task" button is shown again
-                issue_model.write(cr, uid, [tsk.issue_id.id], {'task_id': None}, context=context)
-                #If pending work, issue is not closed, but set to "PENDING"
-                if tsk.todo_desc:
-                    issue_model.case_pending(cr, uid, [tsk.issue_id.id])
-                else:
-                    issue_model.case_close(cr, uid, [tsk.issue_id.id])
-        return res
-   
-    def do_cancel(self, cr, uid, ids, context=None):
-        """
-        Clean up related Issues's 'Current Task'
-        """ 
-        issue_model = self.pool.get('project.issue')
-        for tsk in self.browse(cr, uid, ids):
-            if tsk.issue_id and tsk.issue_id.state not in ['closed', 'cancelled']:
-                issue_model.write(cr, uid, [tsk.issue_id.id], {'task_id': None}, context=context)
-        return super(task, self).do_cancel(cr, uid, ids, context)
-
-task()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
-
+        'issue_id': fields.many2one(
+            'project.issue', 'Related Issue', readonly=True),
+        'ref': fields.char('Reference', 20),
+        'reason_id': fields.many2one('project.task.cause', 'Problem Cause'),
+        }
+
+    def action_close(self, cr, uid, ids, context=None):
+        """ On Task Close, also close Issue """
+        issue_ids = [x.issue_id.id
+                     for x in self.browse(cr, uid, ids, context=context)
+                     if x.issue_id]
+        self.pool.get('project.issue').case_close(
+            cr, uid, issue_ids, context=context)
+        return super(task, self).action_close(cr, uid, ids, context=context)

=== renamed file 'project_task_service/project_task_cause.py' => 'project_issue_task/project_task_cause.py' (properties changed: +x to -x)
--- project_task_service/project_task_cause.py	2012-11-22 13:29:38 +0000
+++ project_issue_task/project_task_cause.py	2013-11-20 17:31:26 +0000
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 ##############################################################################
-#    
+#
 #    Copyright (C) 2012 Daniel Reis
 #
 #    This program is free software: you can redistribute it and/or modify
@@ -18,11 +18,12 @@
 #
 ##############################################################################
 
-from osv import fields, osv
-
-class project_task_cause(osv.osv):
+from openerp.osv import fields, orm
+
+
+class project_task_cause(orm.Model):
     _name = 'project.task.cause'
-    _description = 'Incident Cause'
+    _description = 'Issue Cause'
     _order = 'sequence'
     _columns = {
         'name': fields.char('Cause', required=True, size=64, translate=True),
@@ -33,8 +34,3 @@
     _defaults = {
         'sequence': 10
     }
-project_task_cause()
-    
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
-

=== renamed file 'project_task_service/project_task_cause_view.xml' => 'project_issue_task/project_task_cause_view.xml' (properties changed: +x to -x)
--- project_task_service/project_task_cause_view.xml	2012-11-22 14:24:56 +0000
+++ project_issue_task/project_task_cause_view.xml	2013-11-20 17:31:26 +0000
@@ -6,39 +6,48 @@
         <record id="task_cause_edit" model="ir.ui.view">
             <field name="name">project.task.cause.form</field>
             <field name="model">project.task.cause</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
-                <form string="Task Incident Causes">
+
+              <form string="Task Issue Causes">
+                <group>
+                  <group>
                     <field name="name"/>
+                    <field name="description"/>
+                  </group>
+                  <group>
                     <field name="sequence"/>
                     <field name="code"/>
-                    <separator string="Description" colspan="4"/>
-                    <field colspan="4" name="description" nolabel="1"/>
-                </form>
+                  </group>
+                </group>
+              </form>
+
             </field>
         </record>
 
         <record id="task_cause_tree" model="ir.ui.view">
             <field name="name">project.task.cause.tree</field>
-            <field name="model">project.cause.type</field>
-            <field name="type">tree</field>
+            <field name="model">project.task.cause</field>
             <field name="arch" type="xml">
-                <tree string="Task Incident Causes">
+
+                <tree string="Task Issue Causes">
                     <field name="sequence"/>
                     <field name="code"/>
                     <field name="name"/>
                 </tree>
+
             </field>
         </record>
 
         <record id="open_task_cause_form" model="ir.actions.act_window">
-            <field name="name">Causes</field>
+            <field name="name">Task Issue Causes</field>
             <field name="res_model">project.task.cause</field>
             <field name="view_type">form</field>
             <field name="view_id" ref="task_cause_tree"/>
         </record>
 
-        <menuitem action="open_task_cause_form" id="menu_task_cause_view" parent="project.menu_project_config_project" sequence="3"/>
+        <menuitem action="open_task_cause_form"
+                  id="menu_task_cause_view"
+                  parent="base.menu_definitions"/>
 
     </data>
 </openerp>

=== modified file 'project_issue_task/project_task_view.xml' (properties changed: +x to -x)
--- project_issue_service/project_task_view.xml	2012-11-22 14:24:56 +0000
+++ project_issue_task/project_task_view.xml	2013-11-20 17:31:26 +0000
@@ -2,50 +2,25 @@
 <openerp>
     <data>
 
-        <!--PROJECT TASK CATEGORIES -->
-        <record id="project_task_categ_action" model="ir.actions.act_window">
-            <field name="name">Task Categories</field>
-            <field name="res_model">crm.case.categ</field>
-            <field name="view_type">form</field>
-            <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
-            <field name="domain">[('object_id.model', '=', 'project.task')]</field>
-            <field name="context" eval="{'object_id': ref('project.model_project_task')}"/>
-        </record>
-        <menuitem action="project_task_categ_action" name="Categories" id="menu_project_task_category_act" parent="project.menu_project_config_project" />
-
-
-        <!-- TASK FORM -->
-        <record id="view_project_task_form_dreis" model="ir.ui.view">
-            <field name="name">project.task.form.dreis</field>
+        <record id="view_project_task_form_issue" model="ir.ui.view">
+            <field name="name">project.task.form.issue</field>
             <field name="model">project.task</field>
             <field name="inherit_id" ref="project.view_task_form2"/>
             <field name="arch" type="xml">
-                <field name="progress" position="after">
+
+                <field name="date_deadline" position="before">
+                    <field name="ref"/>
+                </field>
+                <field name="partner_id" position="after">
                     <field name="issue_id"/>
-                    <field name="categ_id" widget="selection" 
-                           domain="['|',('object_id.model', '=', 'project.task'),('object_id.model', '=', 'project.issue'),('parent_id','!=',None)]"/>
-                </field>
-                <field name="partner_id" position="after">
-                    <field name="section_id"/>
-                </field>
-                <field name="description" position="attributes">
-                    <attribute name="attrs">{'readonly':[('state','!=','draft')]}</attribute>
-                </field>
-            </field>
-        </record>
+                </field>
+                <field name="description" position="before">
+                  <group>
+                    <field name="reason_id"
+                           attrs="{'invisible': [('issue_id','=',False)]}"/>
+                  </group>
+                </field>
 
-        <!-- TASK TREE -->
-        <record id="view_task_tree2" model="ir.ui.view">
-            <field name="name">project.task.tree</field>
-            <field name="model">project.task</field>
-            <field name="inherit_id" ref="project.view_task_tree2"/>
-            <field name="arch" type="xml">
-            
-                <field name="user_id" position="after">
-                    <field name="date_start"/>
-                    <field name="date_end"/>
-                </field>
-            
             </field>
         </record>
 

=== renamed directory 'project_task_service/security' => 'project_issue_task/security'
=== modified file 'project_issue_task/security/ir.model.access.csv' (properties changed: +x to -x)
--- project_task_service/security/ir.model.access.csv	2012-11-22 13:29:38 +0000
+++ project_issue_task/security/ir.model.access.csv	2013-11-20 17:31:26 +0000
@@ -1,3 +1,3 @@
 "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
 "access_project_task_cause_project_manager","project_task_cause_project_manager","model_project_task_cause","project.group_project_manager",1,1,1,1
-"access_project_task_cause_project_user","project_task_cause_project_user","model_project_task_cause","project.group_project_user",1,0,0,0
+"access_project_task_cause_project_user","project_task_cause_project_user","model_project_task_cause","base.group_user",1,0,0,0

=== added file 'project_issue_task/security/project_security.xml'
--- project_issue_task/security/project_security.xml	1970-01-01 00:00:00 +0000
+++ project_issue_task/security/project_security.xml	2013-11-20 17:31:26 +0000
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+
+
+        <record model="ir.rule" id="issue_related_task_employee">
+            <field name="name">Project/Task: Employees can view Issue's related Task</field>
+            <field name="model_id" ref="project.model_project_task"/>
+            <field name="groups" eval="[(4,ref('base.group_user'))]"/>
+            <field name="domain_force">[('issue_id.message_follower_ids', 'in', [user.partner_id.id])]</field>
+            <field name="perm_read" eval="True"/>
+            <field name="perm_create" eval="False"/>
+            <field name="perm_write" eval="False"/>
+            <field name="perm_unlink" eval="False"/>
+        </record>
+
+        <record model="ir.rule" id="issue_related_task_project_user">
+            <field name="name">Project/Task: Project Users can edit Issue's related Task</field>
+            <field name="model_id" ref="project.model_project_task"/>
+            <field name="groups" eval="[(4,ref('project.group_project_user'))]"/>
+            <field name="domain_force">[('issue_id.message_follower_ids', 'in', [user.partner_id.id])]</field>
+            <field name="perm_read" eval="True"/>
+            <field name="perm_create" eval="True"/>
+            <field name="perm_write" eval="True"/>
+            <field name="perm_unlink" eval="True"/>
+        </record>
+
+
+    </data>
+</openerp>

=== removed directory 'project_task_service'
=== removed file 'project_task_service/__init__.py'
--- project_task_service/__init__.py	2012-11-22 13:29:38 +0000
+++ project_task_service/__init__.py	1970-01-01 00:00:00 +0000
@@ -1,4 +0,0 @@
-# -*- coding: utf-8 -*-
-import project_task_cause
-import project_task
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== removed file 'project_task_service/__openerp__.py'
--- project_task_service/__openerp__.py	2013-03-04 16:16:31 +0000
+++ project_task_service/__openerp__.py	1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    Copyright (C) 2012 Daniel Reis
-#
-#    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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-{
-    'name': 'Project Task Record',
-    'version': '1.0',
-    "category": "Project Management",
-    'description': """\
-Add to project tasks all necessary fields to record a service intervention:
-* Time spent
-* Materials used
-* Work done description
-* Work pending description
-* Problem cause identification
-
-Before creating new Projects, review the following configurations::
-* Stages: the task stages ""common to all projects" are assigned to new projects by default.
-* Causes: the possible reasons for problem causing a service incidents.
-* Functional Blocks: the sub-components or sub-systems for projects.
-
-Contributions are appreciated. Some ideas to develop:
-* add a 'crm_category_stages' module, to make configurable the stages (type_ids) valid for each Category.
-""",
-    'author': 'Daniel Reis',
-    'website': 'daniel.reis@xxxxxxxxxxxx',
-    'depends': ['project', 'project_functional_blocks', 'project_department'],
-    'update_xml': [
-        'project_task_cause_view.xml',
-        'project_task_view.xml',
-        'security/ir.model.access.csv',
-    ],
-    'installable': False,
-    'application': False,
-}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== removed file 'project_task_service/project_task.py'
--- project_task_service/project_task.py	2012-11-22 13:29:38 +0000
+++ project_task_service/project_task.py	1970-01-01 00:00:00 +0000
@@ -1,88 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#    
-#    Copyright (C) 2012 Daniel Reis
-#
-#    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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-from osv import fields, osv
-from datetime import datetime, timedelta
-
-class task(osv.osv):
-    #FUTURE: use task recurrency, to generate maintenance plans
-    #FUTURE: Apply maintenance plan templates (use Project templates?)
-    _inherit = "project.task"
-    _columns = {
-        #modified fields:
-        'functional_block_id': fields.many2one('project.functional_block', 'Component', 
-            help = "Component (system, module, function) to be addressed"),
-        #added fields:
-        'ref': fields.char('Code', 20, help="Service Order number"),
-        'report_desc': fields.text('Work description'),
-        'todo_desc': fields.text('Pending issues description'),
-        'reason_id': fields.many2one('project.task.cause', 'Problem Cause', \
-            help='Cause for the incident that made this task necessary. Available list depends on the Task Type.'),
-    }
-
-    def do_close(self, cr, uid, ids, context=None):
-        #Automatically adjust Task Start and End dates based on Work details:
-        for t in  self.browse(cr, uid, ids, context=context):
-            task_dts = t.date_start
-            task_dte = t.date_end or t.date_start
-            for w in t.work_ids:
-                #Task start date should not be later than the oldest work line
-                work_dts = w.date
-                task_dts = min(task_dts, work_dts) or work_dts
-                #Task end date should not be before the last work line
-                d = datetime.strptime(w.date, '%Y-%m-%d %H:%M:%S') \
-                    + timedelta(seconds=round(w.hours*3600) )
-                work_dte = d.strftime('%Y-%m-%d %H:%M:%S')
-                task_dte = max(task_dte, work_dte) or work_dte
-            vals = {'date_start': task_dts, 'date_end': task_dte}
-            self.write(cr, uid, [t.id],vals, context=context)
-        return super(task, self).do_close(cr, uid, ids, context)
-    
-task()
-
-
-class project_work(osv.osv):
-    #Changed Task work default Date to Y-m-d
-    _inherit = "project.task.work"
-    _defaults = {
-        'date': lambda *a: datetime.now().strftime('%Y-%m-%d'),
-    }
-project_work()
-
-
-class project_task_type(osv.osv):
-    _inherit = 'project.task.type'
-    _columns = {
-        'code': fields.char('Code', size=10),
-    }
-project_task_type()
-
-
-class project_functional_block(osv.osv):
-    _inherit = 'project.functional_block'
-    _columns = {
-        'code': fields.char('Code', size=10),
-    }
-project_functional_block()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
-

=== removed file 'project_task_service/project_task_view.xml'
--- project_task_service/project_task_view.xml	2012-11-22 13:29:38 +0000
+++ project_task_service/project_task_view.xml	1970-01-01 00:00:00 +0000
@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-    <data>
-    
-        <!-- Task type CODE -->
-        <record id="task_type_edit_dreis" model="ir.ui.view">
-            <field name="name">project.task.type.form.dreis</field>
-            <field name="model">project.task.type</field>
-            <field name="inherit_id" ref="project.task_type_edit"/>
-            <field name="arch" type="xml">
-                <field name="sequence" position="after">
-                    <field name="code"/>
-                </field>
-            </field>
-        </record>
-
-        <!-- Task FORM -->
-        <record id="view_project_task_form_dreis" model="ir.ui.view">
-            <field name="name">project.task.form.dreis</field>
-            <field name="model">project.task</field>
-            <field name="inherit_id" ref="project.view_task_form2"/>
-            <field name="arch" type="xml">
-                <field name="progress" position="after">
-                    <field name="ref" string="Service Order Id"/>
-                </field>
-                <!-- State allowed transitions: 
-                      draft   -> open, cancel
-                      open    -> draft, pending, close 
-                      pending -> open
-                      close   -> draft ("reset"
-                -->
-                <button name="do_cancel" position="attributes">
-                    <attribute name="states">draft, open</attribute>
-                </button>
-                <button name="do_draft" position="attributes">
-                    <attribute name="states">close,cancel</attribute>
-                </button>
-                <button name="do_pending" position="attributes">
-                    <attribute name="states">open</attribute>
-                </button>
-                <button name="do_open" position="attributes">
-                    <attribute name="states">draft,pending</attribute>
-                </button>
-                <button name="action_close" position="attributes">
-                    <attribute name="states">open</attribute>
-                </button>
-
-                <field name="type_id" position="replace"/>
-                <button name="prev_type" position="replace"/>
-                <button name="next_type" position="replace"/>
-
-                <field name="work_ids" position="replace">
-                    <!-- Task Time spent -->
-                    <field colspan="4" name="work_ids" nolabel="1" 
-                           attrs="{'readonly':[('state','in',['done','draft'])]}">
-                        <tree string="Task Work" editable="top">
-                            <field name="date" string="Start Datetime"/>
-                            <field name="hours" widget="float_time" sum="Spent Hours" string="Spent Hours (hh:mm)"/>
-                            <field name="user_id"/>
-                            <field name="name" string="Comments"/>
-                        </tree>
-                    </field>
-                    <!-- Task Work Description -->
-                    <group col="4" colspan="4" attrs="{'invisible':[('state','in',['draft','cancel'])]}">
-                        <separator string="Work Description" colspan="4"/>
-                        <field name="report_desc" nolabel="1" colspan="4"/>
-                        <field name="reason_id" widget="selection"/>
-                        <group col="4" colspan="2">
-                            <field name="type_id" widget="selection" domain="[('code','!=',None)]"/>
-                            <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
-                            <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
-                        </group>
-                        <label string="Issues to be adressed" colspan="4"/>
-                        <field name="todo_desc" nolabel="1" colspan="4"/>
-                    </group>
-                </field>
-            </field>
-        </record>
-        
-        <!-- TASK TREE -->
-        <record id="view_project_task_tree_dreis" model="ir.ui.view">
-            <field name="name">project.task.tree.dreis</field>
-            <field name="model">project.task</field>
-            <field name="inherit_id" ref="project.view_task_tree2"/>
-            <field name="arch" type="xml">
-                <!-- States: OPEN:draft,pending; CLOSE:open,pending -->
-                <button name="do_open" position="attributes">
-                    <attribute name="states">draft,pending</attribute>
-                </button>
-                <button name="action_close" position="attributes">
-                    <attribute name="states">open</attribute>
-                </button>
-            </field>
-        </record>
-
-        <!-- TASK SEARCH -->
-        <record id="view_project_task_search_dreis" model="ir.ui.view">
-            <field name="name">project.task.search.dreis</field>
-            <field name="model">project.task</field>
-            <field name="inherit_id" ref="project.view_task_search_form"/>
-            <field name="arch" type="xml">
-                <field name="project_id" position="replace">
-                        <field name="project_id"
-                               filter_domain="['|','|', ('project_id','ilike',self), ('partner_id','ilike',self), ('name','ilike',self)]"/>
-                </field>
-            </field>
-        </record>
-
-        <!--Task Calendar: project_id before name, uses date_start, not date_deadline-->
-        <record id="view_task_calendar_reis1" model="ir.ui.view">
-            <field name="name">project.task.calendar.reis</field>
-            <field name="model">project.task</field>
-            <field name="type">calendar</field>
-            <field eval="1" name="priority"/>
-            <field name="arch" type="xml">
-                <calendar color="user_id" date_start="date_start" date_delay="planned_hours" string="Tasks">
-                    <field name="project_id"/>
-                    <field name="name"/>
-                </calendar>
-            </field>
-        </record>
-        
-        <!-- TASK MENU ACTION:
-            * No filter buttons activated by default
-            * User's "Department_id" selected by default
-            * Kanban view sequence moved to last   
-        -->
-        <record id="project.action_view_task" model="ir.actions.act_window">
-            <field name="name">Tasks</field>
-            <field name="res_model">project.task</field>
-            <field name="view_type">form</field>
-            <field name="view_mode">tree,form,calendar,gantt,graph,kanban</field>
-            <field eval="False" name="filter"/>
-            <field name="view_id" eval="False"/>
-            <field name="context">{"search_default_project_id": project_id, "search_default_department_id": department_id}</field>
-            <field name="search_view_id" ref="project.view_task_search_form"/>
-            <field name="help">A task represents a work that has to be done. Each user works in his own list of tasks where he can record his task work in hours. He can work and close the task itself or delegate it to another user. If you delegate a task to another user, you get a new task in pending state, which will be reopened when you have to review the work achieved. If you install the project_timesheet module, task work can be invoiced based on the project configuration. With the project_mrp module, sales orders can create tasks automatically when they are confirmed.</field>
-        </record>
-        <record id="project.open_view_task_list_kanban" model="ir.actions.act_window.view">
-            <field name="sequence" eval="10"/>
-        </record>
-
-        <!--### REPORT 
-        <report auto="False" id="project_task_webkitreport" 
-        model="project.task" 
-        name="project_task_webkitreport"  
-        file="project_service/report/report_project_task.mako" 
-        string="Print Task Report" report_type="webkit" />
-        -->
-
-        </data>
-</openerp>

=== removed directory 'project_task_service/static'
=== removed directory 'project_task_service/static/src'
=== removed directory 'project_task_service/static/src/img'
=== removed file 'project_task_service/static/src/img/icon.png'
Binary files project_task_service/static/src/img/icon.png	2012-11-22 13:29:38 +0000 and project_task_service/static/src/img/icon.png	1970-01-01 00:00:00 +0000 differ

Follow ups