parent
67999a7e4e
commit
fc0c225828
|
@ -686,7 +686,7 @@ class task(osv.osv):
|
|||
def prev_type(self, cr, uid, ids, *args):
|
||||
for task in self.browse(cr, uid, ids):
|
||||
typeid = task.type_id.id
|
||||
types = map(lambda x:x.id, task.project_id.type_ids)
|
||||
types = map(lambda x:x.id, task.project_id and task.project_id.type_ids or [])
|
||||
if types:
|
||||
if typeid and typeid in types:
|
||||
index = types.index(typeid)
|
||||
|
|
|
@ -484,7 +484,7 @@
|
|||
</record>
|
||||
|
||||
<record id="open_task_type_form" model="ir.actions.act_window">
|
||||
<field name="name">Task Stages</field>
|
||||
<field name="name">Stages</field>
|
||||
<field name="res_model">project.task.type</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="task_type_tree"/>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="vertical" string="Project Issue" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field group="True" name="user_id"/>
|
||||
</graph>
|
||||
|
|
|
@ -177,7 +177,7 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
'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', 'Resolution', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'type_id': fields.many2one ('project.task.type', 'Resolution', 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)]"),
|
||||
|
@ -279,15 +279,28 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
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=None):
|
||||
if context is None:
|
||||
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':{}}
|
||||
|
||||
def next_type(self, cr, uid, ids, *args):
|
||||
for task in self.browse(cr, uid, ids):
|
||||
typeid = task.type_id.id
|
||||
types = map(lambda x:x.id, task.project_id.type_ids or [])
|
||||
if types:
|
||||
if not typeid:
|
||||
self.write(cr, uid, task.id, {'type_id': types[0]})
|
||||
elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
|
||||
index = types.index(typeid)
|
||||
self.write(cr, uid, task.id, {'type_id': types[index+1]})
|
||||
return True
|
||||
|
||||
def prev_type(self, cr, uid, ids, *args):
|
||||
for task in self.browse(cr, uid, ids):
|
||||
typeid = task.type_id.id
|
||||
types = map(lambda x:x.id, task.project_id and task.project_id.type_ids or [])
|
||||
if types:
|
||||
if typeid and typeid in types:
|
||||
index = types.index(typeid)
|
||||
self.write(cr, uid, task.id, {'type_id': index and types[index-1] or False})
|
||||
return True
|
||||
|
||||
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
|
||||
if context is None:
|
||||
|
@ -370,31 +383,6 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
|
||||
return res
|
||||
|
||||
def get_stage_dict(self, cr, uid, ids, context=None):
|
||||
"""This function gives dictionary for stage according to stage levels
|
||||
@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 IDs
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
stage_obj = self.pool.get('crm.case.stage')
|
||||
domain = [('object_id.model', '=', self._name)]
|
||||
if 'force_domain' in context and context['force_domain']:
|
||||
domain += context['force_domain']
|
||||
sid = stage_obj.search(cr, uid, domain, context=context)
|
||||
s = {}
|
||||
previous = {}
|
||||
section = self._name
|
||||
|
||||
for stage in stage_obj.browse(cr, uid, sid, context=context):
|
||||
s.setdefault(section, {})
|
||||
s[section][previous.get(section, False)] = stage.id
|
||||
previous[section] = stage.id
|
||||
return s
|
||||
|
||||
|
||||
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
|
|
@ -31,39 +31,5 @@
|
|||
<field name="name">v3.0</field>
|
||||
</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>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<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 eval="15.0" name="duration"/>
|
||||
<field eval=""Bug in Accounts module"" name="name"/>
|
||||
|
@ -30,7 +29,6 @@
|
|||
<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>
|
||||
|
@ -45,7 +43,6 @@
|
|||
<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>
|
||||
|
@ -61,7 +58,6 @@
|
|||
<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>
|
||||
|
@ -76,7 +72,6 @@
|
|||
<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>
|
||||
|
@ -92,7 +87,6 @@
|
|||
<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>
|
||||
|
@ -108,7 +102,6 @@
|
|||
<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>
|
||||
|
@ -124,7 +117,6 @@
|
|||
<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>
|
||||
|
@ -139,7 +131,6 @@
|
|||
<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>
|
||||
|
@ -155,7 +146,6 @@
|
|||
<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>
|
||||
|
@ -171,7 +161,6 @@
|
|||
<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>
|
||||
|
@ -187,7 +176,6 @@
|
|||
<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"/>
|
||||
|
@ -204,7 +192,6 @@
|
|||
<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"/>
|
||||
|
@ -222,7 +209,6 @@
|
|||
<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>
|
||||
|
@ -238,7 +224,6 @@
|
|||
<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>
|
||||
|
@ -254,7 +239,6 @@
|
|||
<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>
|
||||
|
|
|
@ -44,17 +44,6 @@
|
|||
|
||||
<menuitem action="project_issue_categ_action" name="Categories" id="menu_project_issue_category_act" parent="menu_project_confi" />
|
||||
|
||||
<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" name="Stages" id="menu_project_issue_stage_act" parent="menu_project_confi"/>
|
||||
|
||||
<record model="ir.ui.view" id="project_issue_form_view">
|
||||
<field name="name">Project Issue Tracker Form</field>
|
||||
<field name="model">project.issue</field>
|
||||
|
@ -68,9 +57,9 @@
|
|||
<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" readonly="1"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
<field name="type_id" widget="selection" readonly="1"/>
|
||||
<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>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
|
@ -194,11 +183,9 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="project_id" />
|
||||
<field name="priority" string="Priority"/>
|
||||
<field name="stage_id"/>
|
||||
<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" widget="selection" readonly="1"/>
|
||||
<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"/>
|
||||
<field name="version_id" widget="selection"/>
|
||||
<field name="user_id"/>
|
||||
<field name="assigned_to"/>
|
||||
|
@ -259,7 +246,7 @@
|
|||
<filter string="Priority" icon="terp-rating-rated" domain="[]"
|
||||
context="{'group_by':'priority'}" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
context="{'group_by':'type_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
|
@ -297,11 +284,9 @@
|
|||
<field name="name" string="Feature description"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
<field name="stage_id"/>
|
||||
<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" widget="selection" readonly="1"/>
|
||||
<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"/>
|
||||
<field name="version_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
|
|
|
@ -75,7 +75,7 @@ class project_issue_report(osv.osv):
|
|||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
'date_closed': fields.date('Date of Closing', readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'type_id': fields.many2one ('project.task.type', 'Stage'),
|
||||
'nbr': fields.integer('# of Issues', readonly=True),
|
||||
'working_hours_open': fields.float('Avg. Working Hours to Open', readonly=True),
|
||||
'working_hours_close': fields.float('Avg. Working Hours to Close', readonly=True),
|
||||
|
@ -111,7 +111,7 @@ class project_issue_report(osv.osv):
|
|||
c.working_hours_close,
|
||||
c.section_id,
|
||||
c.categ_id,
|
||||
c.stage_id,
|
||||
c.type_id,
|
||||
to_char(c.date_closed, 'YYYY-mm-dd') as date_closed,
|
||||
c.company_id as company_id,
|
||||
c.priority as priority,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<field name="name" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="version_id" string="Version" invisible="1"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<separator orientation="vertical"/>
|
||||
<field name="version_id" widget="selection" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]" />
|
||||
<field name="type_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<filter string="Version" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'version_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
"access_crm_case_categ_supp","crm.case.categ","crm.model_crm_case_categ","project_issue.group_project_supporter",1,0,0,0
|
||||
"access_project_issue_version_project","project_issue_version manager","model_project_issue_version","project.group_project_manager",1,1,1,1
|
||||
"access_project_issue_version","project_issue_version manager","model_project_issue_version","project_issue.group_project_supporter",1,0,0,0
|
||||
"access_crm_case_stage_manager_suppo","crm.case.stage","crm.model_crm_case_stage","project_issue.group_project_supporter",1,0,0,0
|
||||
"access_project_issue_system","project.issue system","model_project_issue","base.group_system",1,0,0,0
|
||||
"access_crm_case_stage_manager_system","crm.case.stage system","crm.model_crm_case_stage","base.group_system",1,1,1,1
|
||||
"access_project_issue_report_system","project.issue.report system","model_project_issue_report","base.group_system",1,0,0,0
|
||||
"access_crm_case_section_system","crm.case.section system","crm.model_crm_case_section","base.group_system",1,1,1,1
|
||||
"access_project_issue_report_user","project.issue.report user","model_project_issue_report","project.group_project_user",1,0,0,0
|
||||
|
|
|
Loading…
Reference in New Issue