[IMP] crm_lead: added default value for stage. Will certainly be updated.
bzr revid: tde@openerp.com-20120521161545-rmkktn1p4wt2u9zk
This commit is contained in:
parent
23b8224909
commit
273eaf67c6
|
@ -351,6 +351,10 @@ class crm_case(crm_base):
|
|||
And object that inherit (orm inheritance) from a class the overwrite copy
|
||||
"""
|
||||
|
||||
def _get_default_stage_id(self, cr, uid, context=None):
|
||||
""" Gives default stage_id """
|
||||
return self.stage_find(cr, uid, False, [('state', '=', 'draft')], context=context)
|
||||
|
||||
def stage_set_with_state_name(self, cr, uid, cases, state_name, context=None):
|
||||
""" TODO
|
||||
"""
|
||||
|
|
|
@ -208,6 +208,7 @@ class crm_lead(crm_case, osv.osv):
|
|||
'user_id': crm_case._get_default_user,
|
||||
'email_from': crm_case._get_default_email,
|
||||
'type': 'lead',
|
||||
'stage_id': crm_case._get_default_stage_id,
|
||||
'section_id': crm_case._get_section,
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
|
||||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
|
|
|
@ -401,9 +401,11 @@
|
|||
<button name="case_cancel" string="Cancel" type="object"
|
||||
states="draft" icon="gtk-cancel"/>
|
||||
<div class="oe_right">
|
||||
<field name="stage_id" nolabel="1" widget="statusbar"
|
||||
<field name="stage_id" nolabel="1" widget="statusbar"/>
|
||||
<!--
|
||||
statusbar_visible="New,Qualification,Proposition,Won"
|
||||
statusbar_colors='{"Negotiation":"blue"}'/>
|
||||
-->
|
||||
</div>
|
||||
<div class="oe_clear"/>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue