[IMP]: crm*: Improvement in section and stage relation, Improved domain of stage_id
bzr revid: rpa@tinyerp.com-20101006121146-pua39253fb2rcgp1
This commit is contained in:
+9
-1
@@ -538,7 +538,7 @@ class crm_case_section(osv.osv):
|
||||
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
|
||||
'note': fields.text('Description'),
|
||||
'working_hours': fields.float('Working Hours', digits=(16,2 )),
|
||||
'stage_ids':fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
|
||||
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -628,6 +628,14 @@ class crm_case_categ(osv.osv):
|
||||
crm_case_categ()
|
||||
|
||||
|
||||
class crm_case_stage(osv.osv):
|
||||
_inherit = "crm.case.stage"
|
||||
_columns = {
|
||||
'section_ids':fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', 'Sections'),
|
||||
}
|
||||
crm_case_stage()
|
||||
|
||||
|
||||
class crm_case_resource_type(osv.osv):
|
||||
""" Resource Type of case """
|
||||
_name = "crm.case.resource.type"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<field name="stage_id" domain="[('object_id.model', '=', 'crm.lead'), ('section_ids', '=', section_id)]"/>
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending,draft" type="object"
|
||||
@@ -234,7 +234,7 @@
|
||||
<field name="referred" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
|
||||
<field name="stage_id" readonly="1"/>
|
||||
<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"
|
||||
|
||||
@@ -14,9 +14,8 @@
|
||||
<label string="Stage:" align="1.0"/>
|
||||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
widget="selection"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
domain="[('object_id.model', '=', 'crm.lead'), ('section_ids', '=', section_id)]"/>
|
||||
<button name="stage_previous"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
|
||||
@@ -107,11 +107,10 @@
|
||||
<group colspan="4" col="6">
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="section_id" widget="selection"/>
|
||||
<label string="Stage: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" nolabel="1" readonly="1"
|
||||
<group colspan="2" col="4">
|
||||
<field name="stage_id"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('object_id.model', '=', 'crm.claim')]" />
|
||||
domain="[('object_id.model', '=', 'crm.claim'), ('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>
|
||||
|
||||
Reference in New Issue
Block a user