[ADD] Project_issue Module (Added missing module)
bzr revid: mra@tinyerp.com-20100419083825-3qkk5o1kbvvudblq
This commit is contained in:
parent
94286586e3
commit
8784503e16
|
@ -0,0 +1,26 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import project_issue
|
||||
import report
|
||||
import wizard
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,52 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Issue Management in Project Management',
|
||||
'version': '1.0',
|
||||
'category': 'Generic Modules/CRM & SRM',
|
||||
'description': """
|
||||
This module provide Issues/Bugs Management in Project
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
'website': 'http://www.openerp.com',
|
||||
'depends': [
|
||||
'crm',
|
||||
'project',
|
||||
'hr_timesheet_sheet',
|
||||
],
|
||||
'init_xml': [
|
||||
'project_issue_data.xml'
|
||||
],
|
||||
'update_xml': [
|
||||
'project_issue_view.xml',
|
||||
'project_issue_menu.xml',
|
||||
'report/project_issue_report_view.xml',
|
||||
'security/project_issue_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'demo_xml': ['project_issue_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,243 @@
|
|||
#-*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import base64
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import mx.DateTime
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
import tools
|
||||
from crm import crm
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
from tools.translate import _
|
||||
|
||||
class project_issue(osv.osv):
|
||||
_name = "project.issue"
|
||||
_description = "Project Issue"
|
||||
_order = "priority, id desc"
|
||||
_inherit = 'crm.case'
|
||||
|
||||
def case_open(self, cr, uid, ids, *args):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case's Ids
|
||||
@param *args: Give Tuple Value
|
||||
"""
|
||||
|
||||
res = super(project_issue, self).case_open(cr, uid, ids, *args)
|
||||
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return res
|
||||
|
||||
def _compute_day(self, cr, uid, ids, fields, args, context={}):
|
||||
"""
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Openday’s IDs
|
||||
@return: difference between current date and log date
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
cal_obj = self.pool.get('resource.calendar')
|
||||
res_obj = self.pool.get('resource.resource')
|
||||
|
||||
res = {}
|
||||
for issue in self.browse(cr, uid, ids , context):
|
||||
for field in fields:
|
||||
res[issue.id] = {}
|
||||
duration = 0
|
||||
ans = False
|
||||
if field == 'day_open':
|
||||
if issue.date_open:
|
||||
date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
|
||||
date_open = datetime.strptime(issue.date_open, "%Y-%m-%d %H:%M:%S")
|
||||
ans = date_open - date_create
|
||||
date_until = issue.date_open
|
||||
elif field == 'day_close':
|
||||
if issue.date_closed:
|
||||
date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
|
||||
date_close = datetime.strptime(issue.date_closed, "%Y-%m-%d %H:%M:%S")
|
||||
date_until = issue.date_closed
|
||||
ans = date_close - date_create
|
||||
if ans:
|
||||
resource_id = False
|
||||
if issue.user_id:
|
||||
resource_ids = res_obj.search(cr, uid, [('user_id','=',issue.user_id.id)])
|
||||
resource_id = len(resource_ids) or resource_ids[0]
|
||||
|
||||
duration = float(ans.days)
|
||||
if issue.section_id.resource_calendar_id:
|
||||
duration = float(ans.days) * 24
|
||||
new_dates = cal_obj.interval_get(cr,
|
||||
uid,
|
||||
issue.section_id.resource_calendar_id and issue.section_id.resource_calendar_id.id or False,
|
||||
mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
|
||||
duration,
|
||||
resource=resource_id
|
||||
)
|
||||
no_days = []
|
||||
date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
|
||||
for in_time, out_time in new_dates:
|
||||
if in_time.date not in no_days:
|
||||
no_days.append(in_time.date)
|
||||
if out_time > date_until:
|
||||
break
|
||||
duration = len(no_days)
|
||||
res[issue.id][field] = abs(int(duration))
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate the canall which is this opportunity source."),
|
||||
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('object_id.model', '=', 'crm.project.bug')]"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Severity'),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'partner_name': fields.char("Employee's Name", size=64),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'project_id':fields.many2one('project.project', 'Project'),
|
||||
'duration': fields.float('Duration'),
|
||||
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
'day_open': fields.function(_compute_day, string='Days to Open', \
|
||||
method=True, multi='day_open', type="integer", store=True),
|
||||
'day_close': fields.function(_compute_day, string='Days to Close', \
|
||||
method=True, multi='day_close', type="integer", store=True),
|
||||
'assigned_to' : fields.many2one('res.users', 'Assigned to'),
|
||||
'timesheet_ids' : fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'),
|
||||
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
|
||||
domain="[('partner_id', '=', partner_id)]",
|
||||
required=True),
|
||||
}
|
||||
|
||||
def _get_project(self, cr, uid, context):
|
||||
user = self.pool.get('res.users').browse(cr,uid,uid, context=context)
|
||||
if user.context_project_id:
|
||||
return user.context_project_id
|
||||
return False
|
||||
|
||||
def convert_issue_task(self, cr, uid, ids, context=None):
|
||||
case_obj = self.pool.get('project.issue')
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
task_obj = self.pool.get('project.task')
|
||||
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
# for case in case_obj.browse(cr, uid, ids, context=context):
|
||||
# if case.state != 'open':
|
||||
# raise osv.except_osv(_('Warning !'),
|
||||
# _('Issues or Feature Requests should be in \'Open\' state before converting into Task.'))
|
||||
|
||||
result = data_obj._get_id(cr, uid, 'project', 'view_task_search_form')
|
||||
res = data_obj.read(cr, uid, result, ['res_id'])
|
||||
id2 = data_obj._get_id(cr, uid, 'project', 'view_task_form2')
|
||||
id3 = data_obj._get_id(cr, uid, 'project', 'view_task_tree2')
|
||||
if id2:
|
||||
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if id3:
|
||||
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
|
||||
|
||||
for bug in case_obj.browse(cr, uid, ids, context=context):
|
||||
new_task_id = task_obj.create(cr, uid, {
|
||||
'name': bug.name,
|
||||
'partner_id': bug.partner_id.id,
|
||||
'description':bug.description,
|
||||
'date': bug.date,
|
||||
'project_id':bug.project_id.id,
|
||||
'priority':bug.priority,
|
||||
'user_id':bug.user_id.id,
|
||||
'planned_hours': 0.0,
|
||||
})
|
||||
|
||||
new_task = task_obj.browse(cr, uid, new_task_id)
|
||||
|
||||
vals = {
|
||||
'task_id': new_task_id,
|
||||
}
|
||||
case_obj.write(cr, uid, [bug.id], vals)
|
||||
|
||||
return {
|
||||
'name': _('Tasks'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': 'project.task',
|
||||
'res_id': int(new_task_id),
|
||||
'view_id': False,
|
||||
'views': [(id2,'form'),(id3,'tree'),(False,'calendar'),(False,'graph')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': res['res_id'],
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
def _convert(self, cr, uid, ids, xml_id, context=None):
|
||||
data_obj = self.pool.get('ir.model.data')
|
||||
id2 = data_obj._get_id(cr, uid, 'project_issue', xml_id)
|
||||
categ_id = False
|
||||
if id2:
|
||||
categ_id = data_obj.browse(cr, uid, id2, context=context).res_id
|
||||
if categ_id:
|
||||
self.write(cr, uid, ids, {'categ_id': categ_id})
|
||||
return True
|
||||
|
||||
def convert_to_feature(self, cr, uid, ids, context=None):
|
||||
return self._convert(cr, uid, ids, 'feature_request_categ', context=context)
|
||||
|
||||
def convert_to_bug(self, cr, uid, ids, context=None):
|
||||
return self._convert(cr, uid, ids, 'bug_categ', context=context)
|
||||
|
||||
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
|
||||
if not stage_id:
|
||||
return {'value':{}}
|
||||
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
|
||||
if not stage.on_change:
|
||||
return {'value':{}}
|
||||
return {'value':{}}
|
||||
|
||||
_defaults = {
|
||||
'project_id':_get_project,
|
||||
}
|
||||
|
||||
project_issue()
|
||||
|
||||
class account_analytic_line(osv.osv):
|
||||
_inherit = 'account.analytic.line'
|
||||
_columns = {
|
||||
'create_date' : fields.datetime('Create Date', readonly=True),
|
||||
}
|
||||
|
||||
account_analytic_line()
|
||||
|
||||
class hr_analytic_issue(osv.osv):
|
||||
_inherit = 'hr.analytic.timesheet'
|
||||
|
||||
_columns = {
|
||||
'issue_id' : fields.many2one('project.issue', 'Issue'),
|
||||
}
|
||||
|
||||
hr_analytic_issue()
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Case Categories
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.case.categ" id="bug_categ">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="feature_request_categ">
|
||||
<field name="name">Feature Requests</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case type_id
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<record model="crm.case.resource.type" id="type1">
|
||||
<field name="name">Version 4.2</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type2">
|
||||
<field name="name">Version 4.4</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.case.stage" id="stage1">
|
||||
<field name="name">Accepted as Bug</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage2">
|
||||
<field name="name">Fixed</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage3">
|
||||
<field name="name">Won't fix</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage4">
|
||||
<field name="name">Invalid</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage5">
|
||||
<field name="name">Awaiting Response</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage6">
|
||||
<field name="name">Works For Me</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,307 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
((((((((((( Demo Cases )))))))))))
|
||||
-->
|
||||
<!--For Issue Tracking-->
|
||||
<record id="crm_case_buginaccountsmodule0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_8"/>
|
||||
<field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""5"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_agrolait"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage1"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_agrolait"/>
|
||||
<field eval="15.0" name="duration"/>
|
||||
<field eval=""Bug in Accounts module"" name="name"/>
|
||||
<field eval=""agr@agrolait.com"" name="email_from"/>
|
||||
</record>
|
||||
<record id="crm_case_log_takecorrectiveactions0" model="crm.case.log">
|
||||
<field eval="time.strftime('%Y-%m-08')" name="date"/>
|
||||
<field name="case_id" ref="crm_case_buginaccountsmodule0"/>
|
||||
<field name="som" ref="base.som_normal"/>
|
||||
<field eval=""Take corrective actions"" name="name"/>
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name','=','website')]"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_programnotgivingproperoutput0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_tang"/>
|
||||
<field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
|
||||
<field name="type_id" ref="type2"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_asus"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_asustek"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="3.5" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage2"/>
|
||||
<field eval=""Program not giving proper output"" name="name"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_outputincorrect0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_9"/>
|
||||
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="partner_id" ref="account.analytic_project_1"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_asustek"/>
|
||||
<field eval=""cancel"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="2.3" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage3"/>
|
||||
<field name="project_id" ref="project.project_project_23"/>
|
||||
<field eval=""Output incorrect"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_problemloadingpage0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_13"/>
|
||||
<field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_14"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""cancel"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="4.0" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage4"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Problem loading page"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_pagenotfound0" model="project.issue">
|
||||
<field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_desertic_hispafuentes"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_desertic_hispafuentes"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="1.0" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Page not Found"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_programmingerror0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
|
||||
<field name="type_id" ref="type2"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="4.0" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage6"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Programming Error"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_logicalerrorinprogram0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-26 11:10:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="2.0" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage6"/>
|
||||
<field name="project_id" ref="project.project_project_9"/>
|
||||
<field eval=""Logical Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_constrainterror0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field eval="time.strftime('%Y-%m-25 13:35:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="7.3" name="duration"/>
|
||||
<field name="categ_id" ref="bug_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_9"/>
|
||||
<field eval=""Constraint Error"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_errorinprogram0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_10"/>
|
||||
<field eval="time.strftime('%Y-%m-28 15:40:00')" name="date"/>
|
||||
<field name="type_id" ref="type2"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="partner_id" ref="base.res_partner_5"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="1.3" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_patcheserrorinprogram0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_9"/>
|
||||
<field eval="time.strftime('%Y-%m-28 16:30:00')" name="date"/>
|
||||
<field name="type_id" ref="type2"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_2"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="13.0" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_9"/>
|
||||
<field eval=""Patches Error in Program"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_newfeaturestobeadded0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
|
||||
<field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_maxtor"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""open"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="3.2" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage1"/>
|
||||
<field name="project_id" ref="project.project_project_21"/>
|
||||
<field eval=""New Features To Be Added"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_addmenustothemodule0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_1"/>
|
||||
<field eval="time.strftime('%Y-%m-05 18:00:00')" name="date"/>
|
||||
<field name="type_id" ref="type2"/>
|
||||
<field eval=""1"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="partner_id" ref="base.res_partner_9"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""done"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="3.0" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage2"/>
|
||||
<field name="project_id" ref="project.project_project_21"/>
|
||||
<field eval=""Add menus to the module"" name="name"/>
|
||||
<field eval=""info@opensides.be"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_includeattendancesheetinproject0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_2"/>
|
||||
<field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_10"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""cancel"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="2.0" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage3"/>
|
||||
<field name="project_id" ref="project.project_project_9"/>
|
||||
<field eval=""Include Attendance sheet in Project"" name="name"/>
|
||||
<field eval=""contact@tecsas.fr"" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_createnewobject0" model="project.issue">
|
||||
<field model="res.partner.canal" name="canal_id" search="[('name','=','phone')]"/>
|
||||
<field name="partner_address_id" ref="base.res_partner_address_6"/>
|
||||
<field name="som" ref="base.som_happy"/>
|
||||
<field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""3"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_6"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""draft"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="2.45" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Create new object"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_improvereportsinhrms0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""4"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="15.0" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage6"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Improve Reports in HRMS"" name="name"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_improvereportsinpms0" model="project.issue">
|
||||
<field name="partner_address_id" ref="base.res_partner_address_15"/>
|
||||
<field eval="time.strftime('%Y-%m-21 14:30:00')" name="date"/>
|
||||
<field name="type_id" ref="type1"/>
|
||||
<field eval=""2"" name="priority"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="partner_id" ref="base.res_partner_11"/>
|
||||
<field name="analytic_account_id" ref="account.analytic_project_1"/>
|
||||
<field eval=""pending"" name="state"/>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field eval="1" name="active"/>
|
||||
<field eval="06.15" name="duration"/>
|
||||
<field name="categ_id" ref="feature_request_categ"/>
|
||||
<field name="stage_id" ref="stage5"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field eval=""Improve Reports in PMS"" name="name"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
######################## ISSUE TRACKING (menu) ###########################
|
||||
<!--
|
||||
ALL BUGS
|
||||
-->
|
||||
<record model="ir.actions.act_window" id="project_issue_categ_act0">
|
||||
<field name="name">Issues</field>
|
||||
<field name="res_model">project.issue</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="project_issue_tree_view"/>
|
||||
<field name="domain" eval="[('categ_id','=',ref('bug_categ'))]"/>
|
||||
<field name="context">{"search_default_my_bugs":1,"search_default_current_bugs":1,"search_default_project_id":project_id}</field>
|
||||
<field name="search_view_id" ref="view_project_issue_filter"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view0">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="project_issue_tree_view"/>
|
||||
<field name="act_window_id" ref="project_issue_categ_act0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view0">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">calendar</field>
|
||||
<field name="view_id" ref="project_issue_calendar_view"/>
|
||||
<field name="act_window_id" ref="project_issue_categ_act0"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view0">
|
||||
<field name="sequence" eval="3"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="project_issue_form_view"/>
|
||||
<field name="act_window_id" ref="project_issue_categ_act0"/>
|
||||
</record>
|
||||
|
||||
<!--<menuitem id="menu_aftertask" name="Bug" parent="project.menu_main" visible="False"/>-->
|
||||
<menuitem name="Issues" id="menu_project_issue_track" parent="project.menu_project_management" action="project_issue_categ_act0"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,329 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="project_issue_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Issue 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.issue')]</field>
|
||||
<field name="context">{'object_id':'project.issue'}</field>
|
||||
</record>
|
||||
|
||||
<record id="project_issue_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Issue Stages</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm.crm_case_stage_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'project.issue')]</field>
|
||||
<field name="context">{'object_id':'project.issue'}</field>
|
||||
</record>
|
||||
<menuitem action="project_issue_stage_act" id="menu_project_issue_stage_act" parent="crm.menu_crm_case_stage"/>
|
||||
|
||||
<record model="ir.ui.view" id="project_issue_form_view">
|
||||
<field name="name">Project Issue Tracker Form</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Issue Tracker Form">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="assigned_to" />
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
<field name="project_id" required="True"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Communication"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)"/>
|
||||
<field name="email_from"/>
|
||||
<field name="analytic_account_id" />
|
||||
</group>
|
||||
<group col="3" colspan="2">
|
||||
<separator colspan="3" string="Status"/>
|
||||
<field name="type_id" colspan="3"/>
|
||||
<field name="priority" colspan="3"/>
|
||||
<field name="task_id" />
|
||||
<button string="Convert To Task"
|
||||
name="convert_issue_task"
|
||||
icon="gtk-index" type="object"
|
||||
attrs="{'invisible':[('task_id','!=',False)]}" />
|
||||
</group>
|
||||
<separator string= "Description" colspan="4"/>
|
||||
<field name="description" nolabel="1" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" />
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="History" groups="base.group_extended">
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Date"/>
|
||||
<field name="create_date"/>
|
||||
<field name="write_date" />
|
||||
<field name="date_closed"/>
|
||||
<field name="date_open"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Statistics" colspan="2" col="2"/>
|
||||
<field name="day_open"/>
|
||||
<field name="day_close"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="References" colspan="2"/>
|
||||
<field name="id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<field name="log_ids" nolabel="1" colspan="4">
|
||||
<form string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date" />
|
||||
<field name="user_id" />
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="CC"/>
|
||||
</group>
|
||||
<field name="history_line" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="7" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
<button
|
||||
string="Add a CC"
|
||||
name="%(crm.action_view_crm_email_add_cc_wizard)d"
|
||||
icon="gtk-add" type="action"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'project.issue'}"
|
||||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="description"/>
|
||||
<field name="email_to"/>
|
||||
<field name="date"/>
|
||||
</tree>
|
||||
</field>
|
||||
<button colspan="4" string="Send New Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'project.issue'}"
|
||||
icon="gtk-go-forward" type="action" />
|
||||
</page>
|
||||
<page string="Worklogs">
|
||||
<separator string="Timesheets" colspan="4" />
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
|
||||
<tree editable="top" string="Timesheet">
|
||||
<field name="create_date" string="Date" />
|
||||
<field name="user_id" readonly="1" />
|
||||
<field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
|
||||
|
||||
<field invisible="1" name="journal_id"/>
|
||||
<field invisible="1" name="product_id"/>
|
||||
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
|
||||
<field invisible="1" name="amount"/>
|
||||
<field invisible="1" name="general_account_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="project_issue_tree_view">
|
||||
<field name="name">Project Issue Tracker Tree</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Issue Tracker Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="priority" string="Severity"/>
|
||||
<field name="stage_id" string="Resolution"/>
|
||||
<button icon="gtk-go-back" string=""
|
||||
name="stage_previous" type="object"
|
||||
states="open,draft,pending,done,cancel" />
|
||||
<button icon="gtk-go-forward" string=""
|
||||
name="stage_next" type="object"
|
||||
states="open,draft,pending,done,cancel" />
|
||||
<field name="type_id" string="Version"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_issue_filter" model="ir.ui.view">
|
||||
<field name="name">Project Issue Tracker Search</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Issue Tracker Search">
|
||||
<group>
|
||||
<filter icon="gtk-home" string=" Today "
|
||||
separator="1"
|
||||
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
|
||||
help="Todays's bugs"
|
||||
/>
|
||||
<filter icon="gtk-media-rewind"
|
||||
string=" 7 Days " separator="1"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d')), ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Bugs during last 7 days"
|
||||
/>
|
||||
|
||||
</group>
|
||||
<separator orientation="vertical"/>
|
||||
<group>
|
||||
<field name="name" select='1' string="Subject"/>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Bugs" name="my_bugs"/>
|
||||
</field>
|
||||
<field name="state" select="1">
|
||||
<filter icon="gtk-new" domain="[('state','in',('open','draft'))]" help="Current Bugs" name="current_bugs"/>
|
||||
<filter icon="gtk-yes" domain="[('state','=','open')]" help="Open Bugs"/>
|
||||
</field>
|
||||
<field name="project_id" select="1" widget="selection" string="Project">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('project_id','=',context.get('project_id',False))]"
|
||||
help="My Project"
|
||||
/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By..." colspan="16">
|
||||
<filter string="Stage" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
<filter string="Priority" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Campaign" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'type_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Partner" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Salesman" icon="terp-crm"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="project_issue_calendar_view">
|
||||
<field name="name">Project Issue Tracker Calendar</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Issues" date_start="date" color="user_id" date_delay="duration">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Feature Requests
|
||||
# ------------------------------------------------------
|
||||
|
||||
<record model="ir.ui.view" id="project_feature_tree_view">
|
||||
<field name="name">Project Issue- Feature Tracker Tree</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Feature Tracker Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="id"/>
|
||||
<field name="name" string="Feature description"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="priority" string="Severity"/>
|
||||
<field name="stage_id" string="Resolution"/>
|
||||
<button icon="gtk-go-back" string=""
|
||||
name="stage_previous" type="object"
|
||||
states="open,draft,pending,done,cancel" />
|
||||
<button icon="gtk-go-forward" string=""
|
||||
name="stage_next" type="object"
|
||||
states="open,draft,pending,done,cancel" />
|
||||
<field name="type_id" string="Version"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" icon="gtk-go-up"/>
|
||||
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_project_feature_filter" model="ir.ui.view">
|
||||
<field name="name">Project Issue- Feature Tracker Search</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Feature Tracker Search">
|
||||
<group>
|
||||
<filter icon="gtk-home" string=" Today "
|
||||
separator="1"
|
||||
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]"
|
||||
help="Todays's features"
|
||||
/>
|
||||
<filter icon="gtk-media-rewind"
|
||||
string=" 7 Days " separator="1"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d')), ('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Features during last 7 days"
|
||||
/>
|
||||
</group>
|
||||
<separator orientation="vertical"/>
|
||||
<group>
|
||||
<field name="name" select='1' string="Feature description"/>
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Features" name="my_feature"/>
|
||||
</field>
|
||||
<field name="state" select="1">
|
||||
<filter icon="gtk-new" domain="[('state','in',('open','draft'))]" help="Current Features" name="current_feature"/>
|
||||
<filter icon="gtk-yes" domain="[('state','=','open')]" help="Open Features"/>
|
||||
</field>
|
||||
<field name="project_id" select="1" widget="selection" string="Project">
|
||||
<filter icon="terp-crm"
|
||||
domain="[('project_id','=',context.get('project_id',False))]"
|
||||
help="My Project"
|
||||
/>
|
||||
</field>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import project_issue_report
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
from osv import fields,osv
|
||||
import tools
|
||||
from crm import crm
|
||||
|
||||
class project_issue_report(osv.osv):
|
||||
_name = "project.issue.report"
|
||||
_auto = False
|
||||
_inherit = "crm.case.report"
|
||||
_columns = {
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue.report')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue.report')]"),
|
||||
'nbr': fields.integer('# of Issues', reaadonly=True),
|
||||
'delay_close': fields.char('Delay to close', size=20, readonly=True),
|
||||
'company_id' : fields.many2one('res.company', 'Company'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'project_id':fields.many2one('project.project', 'Project'),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'date_closed': fields.datetime('Close Date', readonly=True),
|
||||
}
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'project_issue_report')
|
||||
cr.execute("""
|
||||
create or replace view project_issue_report as (
|
||||
select
|
||||
min(c.id) as id,
|
||||
to_char(c.create_date, 'YYYY') as name,
|
||||
to_char(c.create_date, 'MM') as month,
|
||||
c.state,
|
||||
c.user_id,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.stage_id,
|
||||
to_char(c.date_closed, 'YYYY/mm/dd') as date_closed,
|
||||
u.company_id as company_id,
|
||||
c.priority as priority,
|
||||
c.project_id as project_id,
|
||||
c.type_id as type_id,
|
||||
count(*) as nbr,
|
||||
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
|
||||
from
|
||||
project_issue c
|
||||
left join
|
||||
res_users u on (c.id = u.id)
|
||||
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id,c.stage_id
|
||||
,c.date_closed,u.company_id,c.priority,c.project_id,c.type_id
|
||||
)""")
|
||||
|
||||
|
||||
project_issue_report()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Report for project issue -->
|
||||
<record id="view_project_issue_report_tree" model="ir.ui.view">
|
||||
<field name="name">project.issue.report.tree</field>
|
||||
<field name="model">project.issue.report</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Project Issue">
|
||||
<field name="name" />
|
||||
<field name="month"/>
|
||||
<field name="priority" />
|
||||
<field name="stage_id" />
|
||||
<field name="type_id" string="Type"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="nbr" string="#Project Issue"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="section_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="date_closed" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_project_issue_report_graph" model="ir.ui.view">
|
||||
<field name="name">project.issue.report.graph</field>
|
||||
<field name="model">project.issue.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="horizontal" string="Project Issue" type="bar">
|
||||
<field name="state"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field group="True" name="user_id"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_project_issue_report_filter" model="ir.ui.view">
|
||||
<field name="name">project.issue.report.select</field>
|
||||
<field name="model">project.issue.report</field>
|
||||
<field name="inherit_id" ref="crm.view_crm_case_filter"/>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="This Year"]' position='replace'>
|
||||
<filter string="This Year" icon="terp-sale" domain="[('name','=',time.strftime('%%Y'))]"/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="This Month"]' position='replace'>
|
||||
<filter string="This Month" icon="terp-sale" domain="[('month','=',time.strftime('%%m'))]" />
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/filter[@string="Lost"]' position='after'>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Closed Today" icon="terp-sale" domain="[('date_closed','=',time.strftime('%%Y/%%m/%%d'))]" />
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[1]/field[3]' position='after'>
|
||||
<field name="project_id" widget="selection"/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]' position='before'>
|
||||
<newline/>
|
||||
<group expand="1" string="Extended options..." colspan="10" col="12">
|
||||
<filter icon="terp-sale"
|
||||
string="Highest"
|
||||
domain="[('priority','=','1')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="High"
|
||||
domain="[('priority','=','2')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Normal"
|
||||
domain="[('priority','=','3')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Low"
|
||||
domain="[('priority','=','4')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Lowest"
|
||||
domain="[('priority','=','5')]"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="Company"]' position='replace'>
|
||||
<filter string="Company" icon="terp-sale" domain="[]" context="{'group_by':'company_id'}"/>
|
||||
</xpath>
|
||||
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="Category"]' position='after'>
|
||||
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Project" icon="terp-sale" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<filter string="Type" icon="terp-sale" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_project_issue_report" model="ir.actions.act_window">
|
||||
<field name="name">Project Issue</field>
|
||||
<field name="res_model">project.issue.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_project_issue_report_tree"/>
|
||||
<field name="search_view_id" ref="view_project_issue_report_filter"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_project_issue_report_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_project_issue_report_tree"/>
|
||||
<field name="act_window_id" ref="action_project_issue_report"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="action_project_issue_report_graph">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_project_issue_report_graph"/>
|
||||
<field name="act_window_id" ref="action_project_issue_report"/>
|
||||
</record>
|
||||
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
|
||||
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
|
||||
<menuitem action="action_project_issue_report" id="menu_project_issue_report_tree" parent="base.menu_project_report"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,3 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_project_issue","project.issue","model_project_issue","crm.group_crm_manager",1,1,1,1
|
||||
"access_project_issue_report","project.issue.report","model_project_issue_report","crm.group_crm_manager",1,0,0,0
|
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
|
||||
<record model="ir.rule.group" id="project_issue_rule_group">
|
||||
<field name="name">project.issue.rule.group</field>
|
||||
<field name="model_id" search="[('model','=','project.issue')]" model="ir.model"/>
|
||||
<field name="global" eval="True"/>
|
||||
</record>
|
||||
<record id="project_issue_rule" model="ir.rule">
|
||||
<field name="domain_force">['|',('project_id','=',False),('project_id','=',user.context_project_id)]</field>
|
||||
<field name="rule_group" ref="project_issue_rule_group"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
Loading…
Reference in New Issue