[IMP]: crm, crm_claim: Improvement for stage_id domain problem

bzr revid: rpa@tinyerp.com-20100713120533-7s3073chf43zn4oo
This commit is contained in:
rpa (Open ERP) 2010-07-13 17:35:33 +05:30
parent 4266b285c3
commit 7ad4315a4b
6 changed files with 11 additions and 14 deletions

View File

@ -139,9 +139,7 @@ and users"),
],'Type', help="Type is used to separate Leads and Opportunities"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
'stage_id': fields.many2one('crm.case.stage', 'Stage'),
'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),

View File

@ -53,8 +53,8 @@
<newline />
<field name="section_id" widget="selection" />
<field name="user_id" />
<field name="stage_id" widget="selection"
domain="[('object_id.model', '=', 'crm.lead')]" />
<field name="stage_id"
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
<group col="2" colspan="1">
<button name="stage_previous" string="Previous"
states="open,pending" type="object"
@ -223,7 +223,7 @@
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<field name="stage_id"/>
<field name="stage_id" />
<button name="stage_previous" string="Previous Stage"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next Stage"

View File

@ -14,8 +14,7 @@
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
widget="selection"
domain="[('object_id.model', '=', 'crm.lead')]" />
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
<button name="stage_previous"
states="open,pending" type="object"
icon="gtk-go-back" string="" />

View File

@ -133,7 +133,7 @@
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="stage_id" widget="selection" domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>

View File

@ -79,9 +79,7 @@ class crm_claim(osv.osv, crm.crm_case):
'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="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
'probability': fields.float('Probability (%)'),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\

View File

@ -47,7 +47,7 @@
</record>
<menuitem action="crm_claim_resource_act" name="Resource Type"
id="menu_crm_claim_stage_act"
id="menu_crm_claim_type_act"
parent="menu_config_claim" />
<!-- Claims -->
@ -125,7 +125,9 @@
<field name="section_id" widget="selection"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="3">
<field name="stage_id" select="1" nolabel="1"/>
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.claim')]" />
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>