[IMP]crm_project: changed the category object name and remove the view
bzr revid: sbh@tinyerp.com-20100119051922-1yz7hwa7pmycqjnx
This commit is contained in:
@@ -6,30 +6,35 @@
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.bug.categ" id="categ1">
|
||||
<record model="crm.case.categ" id="categ1">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.categ" id="categ2">
|
||||
<record model="crm.case.categ" id="categ2">
|
||||
<field name="name">Patches</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.categ" id="categ3">
|
||||
<record model="crm.case.categ" id="categ3">
|
||||
<field name="name">Feature Requests</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Category2
|
||||
Case type_id
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
<record model="crm.bug.type" id="type1">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.type" id="type2">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
@@ -37,33 +42,40 @@
|
||||
-->
|
||||
<!-- For Bugs -->
|
||||
|
||||
<record model="crm.bug.stage" id="stage1">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage2">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage3">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage4">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage5">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage6">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage7">
|
||||
<record model="crm.case.stage" id="stage7">
|
||||
<field name="name">Future</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -3,29 +3,35 @@
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record model="crm.bug.categ" id="categ1">
|
||||
<record model="crm.case.categ" id="categ1">
|
||||
<field name="name">Bugs</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.categ" id="categ2">
|
||||
<record model="crm.case.categ" id="categ2">
|
||||
<field name="name">Patches</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.categ" id="categ3">
|
||||
<record model="crm.case.categ" id="categ3">
|
||||
<field name="name">Feature Requests</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage2">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage5">
|
||||
<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','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="stage7">
|
||||
<record model="crm.case.stage" id="stage7">
|
||||
<field name="name">Future</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.bug')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -7,70 +7,25 @@
|
||||
# Bug Categories
|
||||
# ------------------------------------------------------
|
||||
|
||||
|
||||
<record id="crm_bug_categ_view_form" model="ir.ui.view">
|
||||
<field name="name">crm.bug.categ.form</field>
|
||||
<field name="model">crm.bug.categ</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Bug Category">
|
||||
<field name="name" select="1"/>
|
||||
<field name="probability"/>
|
||||
<field name="section_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="crm_bug_categ_view_tree" model="ir.ui.view">
|
||||
<field name="name">crm.bug.categ.tree</field>
|
||||
<field name="model">crm.bug.categ</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Bug Category">
|
||||
<field name="name"/>
|
||||
<field name="probability"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="crm_bug_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Bug Categories</field>
|
||||
<field name="res_model">crm.bug.categ</field>
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_bug_categ_view_tree"/>
|
||||
<field name="view_id" ref="crm.crm_case_categ_tree-view"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.project.bug')]</field>
|
||||
<field name="context">{'object_id':'crm.project.bug'}</field>
|
||||
</record>
|
||||
# ------------------------------------------------------
|
||||
# Stage
|
||||
# ------------------------------------------------------
|
||||
<record model="ir.ui.view" id="crm_bug_stage_tree">
|
||||
<field name="name">crm.bug.stage.tree</field>
|
||||
<field name="model">crm.bug.stage</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Stages">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="section_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="crm_bug_stage_form">
|
||||
<field name="name">crm.bug.stage.form</field>
|
||||
<field name="model">crm.bug.stage</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Stage">
|
||||
<field name="name" select="1"/>
|
||||
<field name="section_id" select="1" widget="selection"/>
|
||||
<field name="sequence"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="crm_bug_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Bug Stages</field>
|
||||
<field name="res_model">crm.bug.stage</field>
|
||||
<field name="res_model">crm.case.stage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_id" ref="crm_bug_stage_tree"/>
|
||||
<field name="view_id" ref="crm.crm_case_stage_tree"/>
|
||||
<field name="domain">[('object_id.model', '=', 'crm.project.bug')]</field>
|
||||
<field name="context">{'object_id':'crm.project.bug'}</field>
|
||||
</record>
|
||||
<menuitem action="crm_bug_stage_act" id="menu_crm_bug_stage_act" parent="crm.menu_crm_case_stage"/>
|
||||
|
||||
|
||||
@@ -3,17 +3,20 @@
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record model="crm.bug.categ" id="future_patch_categ">
|
||||
<record model="crm.case.categ" id="future_patch_categ">
|
||||
<field name="name">Patches</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.future')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="future_fixed_categ">
|
||||
<record model="crm.case.stage" id="future_fixed_categ">
|
||||
<field name="name">Fixed</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.future')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.bug.stage" id="future_awaiting_categ">
|
||||
<record model="crm.case.stage" id="future_awaiting_categ">
|
||||
<field name="name">Awaiting Response</field>
|
||||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.project.future')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -34,44 +34,6 @@ from osv.orm import except_orm
|
||||
|
||||
from crm import crm
|
||||
|
||||
class crm_bug_categ(osv.osv):
|
||||
_name = "crm.bug.categ"
|
||||
_description = " Bug Categories"
|
||||
_columns = {
|
||||
'name': fields.char('Category Name', size=64, required=True),
|
||||
'probability': fields.float('Probability (%)', required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
}
|
||||
_defaults = {
|
||||
'probability': lambda *args: 0.0
|
||||
}
|
||||
crm_bug_categ()
|
||||
|
||||
class crm_bug_type(osv.osv):
|
||||
_name = "crm.bug.type"
|
||||
_description = "Bug Type"
|
||||
_rec_name = "name"
|
||||
_columns = {
|
||||
'name': fields.char('Claim Type Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
}
|
||||
|
||||
crm_bug_type()
|
||||
|
||||
class crm_bug_stage(osv.osv):
|
||||
_name = "crm.bug.stage"
|
||||
_description = "Stage of Project Bug"
|
||||
_rec_name = 'name'
|
||||
_order = "sequence"
|
||||
_columns = {
|
||||
'name': fields.char('Stage Name', size=64, required=True, translate=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case Section'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
|
||||
}
|
||||
_defaults = {
|
||||
'sequence': lambda *args: 1
|
||||
}
|
||||
crm_bug_stage()
|
||||
|
||||
class crm_project_bug(osv.osv):
|
||||
_name = "crm.project.bug"
|
||||
@@ -89,14 +51,14 @@ class crm_project_bug(osv.osv):
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
'categ_id': fields.many2one('crm.bug.categ','Category', domain="[('section_id','=',section_id)]"),
|
||||
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.bug')]"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'type_id': fields.many2one('crm.bug.type', 'Bug Type', domain="[('section_id','=',section_id)]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.bug')]"),
|
||||
|
||||
'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.bug.stage', 'Stage', domain="[('section_id','=',section_id)]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.bug')]"),
|
||||
'project_id':fields.many2one('project.project', 'Project'),
|
||||
'duration': fields.float('Duration') ,
|
||||
'probability': fields.float('Probability (%)'),
|
||||
@@ -114,7 +76,7 @@ class crm_project_bug(osv.osv):
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.bug.categ').browse(cr, uid, categ, context).probability
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
|
||||
|
||||
@@ -50,14 +50,14 @@ class crm_project_future_request(osv.osv):
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
'categ_id': fields.many2one('crm.bug.categ','Category', domain="[('section_id','=',section_id)]"),
|
||||
'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.future')]"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'type_id': fields.many2one('crm.bug.type', 'Bug Type', domain="[('section_id','=',section_id)]"),
|
||||
'type_id': fields.many2one('crm.case.resource.type', 'Bug Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.future')]"),
|
||||
|
||||
'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.bug.stage', 'Stage', domain="[('section_id','=',section_id)]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.project.future')]"),
|
||||
'project_id':fields.many2one('project.project', 'Project'),
|
||||
'duration': fields.float('Duration') ,
|
||||
'probability': fields.float('Probability (%)'),
|
||||
@@ -71,6 +71,12 @@ class crm_project_future_request(osv.osv):
|
||||
_defaults = {
|
||||
'project_id':_get_project
|
||||
}
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value':{}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value':{'probability':cat}}
|
||||
|
||||
|
||||
crm_project_future_request()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user