[IMP]: remove stage type for crm claim
bzr revid: ksa@tinyerp.co.in-20110817083350-hjwj331jt6hxz80r
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Stage Search">
|
||||
<filter icon="terp-personal" name="lead"
|
||||
string="Lead" domain="[('section_ids', '=', section_id')]"/>
|
||||
string="Lead" domain="[('section_ids', '=', section_id)]"/>
|
||||
<filter icon="terp-personal+" name="opportunity"
|
||||
string="Opportunity" domain="[('section_ids', '=', section_id)]"/>
|
||||
<field name="name"/>
|
||||
|
||||
@@ -73,7 +73,7 @@ class crm_claim(crm.crm_case, osv.osv):
|
||||
'email_cc': fields.text('Watchers Emails', size=252, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('type','=','claim')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_ids','=',section_id)]"),
|
||||
'cause': fields.text('Root Cause'),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
@@ -274,20 +274,4 @@ class res_partner(osv.osv):
|
||||
}
|
||||
res_partner()
|
||||
|
||||
class crm_stage_claim(osv.osv):
|
||||
|
||||
def _get_type_value(self, cr, user, context):
|
||||
list = super(crm_stage_claim, self)._get_type_value(cr, user, context)
|
||||
list.append(('claim','Claim'))
|
||||
return list
|
||||
|
||||
_inherit = "crm.case.stage"
|
||||
_columns = {
|
||||
'type': fields.selection(_get_type_value, 'Type'),
|
||||
}
|
||||
|
||||
|
||||
crm_stage_claim()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<data>
|
||||
<xpath expr="//field[@name='name']" position="before">
|
||||
<filter icon="terp-personal-" name="claim"
|
||||
string="Claim" domain="[('type', '=', 'claim')]" context="{'type' : 'claim'}"/>
|
||||
string="Claim" domain="[('section_ids', '=', section_id)]"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
@@ -101,7 +101,7 @@
|
||||
<field name="section_id" widget="selection" />
|
||||
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id" domain="[('type','=','claim')]"/>
|
||||
<field name="stage_id" domain="[('section_ids','=',section_id)]"/>
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
||||
@@ -62,7 +62,7 @@ class crm_claim_report(osv.osv):
|
||||
'create_date': fields.datetime('Create Date', readonly=True, select=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True, domain="[('type','=','claim')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', readonly=True,domain="[('section_ids','=',section_id)]"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]", readonly=True),
|
||||
@@ -107,7 +107,7 @@ class crm_claim_report(osv.osv):
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
|
||||
(SELECT count(id) FROM mailgate_message WHERE model='crm.claim' AND res_id=c.id AND history=True) AS email,
|
||||
(SELECT avg(probability) FROM crm_case_stage WHERE type='claim' AND id=c.stage_id) AS probability,
|
||||
(SELECT avg(probability) FROM crm_case_stage WHERE id=c.stage_id) AS probability,
|
||||
extract('epoch' from (c.date_deadline - c.date_closed))/(3600*24) as delay_expected
|
||||
from
|
||||
crm_claim c
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('type', '=', 'claim')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('section_ids', '=', 'section_id')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.claim')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="priority" />
|
||||
|
||||
Reference in New Issue
Block a user