parent
0f8c05a451
commit
40df5056bd
|
@ -179,7 +179,7 @@ class crm_case(object):
|
|||
if not stage_record.section_id:
|
||||
section_id = False # only select stages without section
|
||||
|
||||
domain = [('object_id.model', '=', self._name), ('section_id', '=', section_id)]
|
||||
domain = [('object_id.model', '=', self._name), '|', ('section_id', '=', section_id),('section_id','=',False)]
|
||||
if 'force_domain' in context and context['force_domain']:
|
||||
domain += context['force_domain']
|
||||
sid = stage_obj.search(cr, uid, domain, context=context)
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
domain="[('section_id','=',section_id), ('section_id','=',False), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending,draft" type="object"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),('object_id.model', '=', 'crm.lead')]" />
|
||||
<button name="stage_previous"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
|
|
|
@ -62,13 +62,13 @@ class crm_phonecall(crm_case, osv.osv):
|
|||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
# phonecall fields
|
||||
'duration': fields.float('Duration', help="Duration in Minutes"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
domain="['|',('section_id','=',section_id),('section_id','=',False),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_contact': fields.related('partner_address_id', 'name', \
|
||||
|
|
|
@ -100,9 +100,9 @@ class crm_lead_report(osv.osv):
|
|||
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
|
||||
'probable_revenue': fields.float('Probable Revenue', digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id)]" , readonly=True),
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id)]" , readonly=True),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]", readonly=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
|
|
|
@ -34,7 +34,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
|
|||
'date': fields.datetime('Date' , required=True),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, \
|
||||
domain="[('section_id','=',section_id),\
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
|
|||
'name' : fields.char('Call summary', size=64, required=True, select=1),
|
||||
'user_id' : fields.many2one('res.users',"Assign To"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', required=True, \
|
||||
domain="[('section_id','=',section_id),\
|
||||
domain="['|',('section_id','=',False),('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'date': fields.datetime('Date', required=True),
|
||||
'section_id':fields.many2one('crm.case.section','Sales Team'),
|
||||
|
|
Loading…
Reference in New Issue