[IMP] crm_lead: when searching on Sales team, the section_id is now set in context and retrieved in _group_by_full, to display the correct stages. In the lead view, the 'selection' widget has been deleted for section_id, as this has no interest with the new search view.
bzr revid: tde@openerp.com-20120522142954-ouzrb55f7b57fdvr
This commit is contained in:
parent
3f5ebacfcf
commit
13ca2748b1
|
@ -47,8 +47,13 @@ class crm_lead(crm_case, osv.osv):
|
|||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
if type(context.get('default_project_id')) in (int, long):
|
||||
return context.get('default_project_id')
|
||||
if type(context.get('section_id')) in (int, long):
|
||||
return context.get('section_id')
|
||||
if isinstance(context.get('section_id'), basestring):
|
||||
section_name = context['section_id']
|
||||
section_ids = self.pool.get('crm.case.section').name_search(cr, uid, name=section_name, context=context)
|
||||
if len(section_ids) == 1:
|
||||
return section_ids[0][0]
|
||||
return None
|
||||
|
||||
def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
||||
|
|
|
@ -584,8 +584,7 @@
|
|||
help="Unassigned Opportunities" />
|
||||
</field>
|
||||
<field name="section_id"
|
||||
context="{'invisible_section': False, 'section_id': self}"
|
||||
widget="selection">
|
||||
context="{'invisible_section': False, 'section_id': self}">
|
||||
<filter icon="terp-personal+"
|
||||
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
|
||||
context="{'invisible_section': False}"
|
||||
|
|
Loading…
Reference in New Issue