[FIX] crm modules: various fixes about state removal.
bzr revid: tde@openerp.com-20130716153818-7ag1nrjyylj6ze8n
This commit is contained in:
parent
aa389bcd5b
commit
707373ec9e
|
@ -687,7 +687,8 @@ class crm_lead(format_address, osv.osv):
|
|||
partner = self.pool.get('res.partner')
|
||||
customer = partner.browse(cr, uid, partner_id, context=context)
|
||||
for lead in self.browse(cr, uid, ids, context=context):
|
||||
if lead.state in ('done', 'cancel'):
|
||||
# TDE: was if lead.state in ('done', 'cancel'):
|
||||
if (lead.probability == '100') or (lead.probability == '0' and lead.stage_id.sequence != '1'):
|
||||
continue
|
||||
vals = self._convert_opportunity_data(cr, uid, lead, customer, section_id, context=context)
|
||||
self.write(cr, uid, [lead.id], vals, context=context)
|
||||
|
|
|
@ -258,7 +258,6 @@
|
|||
<field name="model">crm.lead</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="stage_id">
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="color"/>
|
||||
<field name="priority"/>
|
||||
|
@ -481,7 +480,6 @@
|
|||
<field name="day_open" groups="base.group_no_one"/>
|
||||
<field name="day_close" groups="base.group_no_one"/>
|
||||
<field name="referred"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<group string="References">
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<field name="creation_month" invisible="1"/>
|
||||
<field name="creation_day" invisible="1"/>
|
||||
<field name="deadline_month" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
|
|
|
@ -68,7 +68,7 @@ class crm_claim(osv.osv):
|
|||
def _get_default_stage_id(self, cr, uid, context=None):
|
||||
""" Gives default stage_id """
|
||||
section_id = self._get_default_section_id(cr, uid, context=context)
|
||||
return self.stage_find(cr, uid, [], section_id, [('state', '=', 'draft')], context=context)
|
||||
return self.stage_find(cr, uid, [], section_id, [('sequence', '=', '1')], context=context)
|
||||
|
||||
_columns = {
|
||||
'id': fields.integer('ID', readonly=True),
|
||||
|
|
|
@ -61,7 +61,6 @@
|
|||
<field name="name">Rejected</field>
|
||||
<field name="sequence">29</field>
|
||||
<field name="case_default" eval="True"/>
|
||||
<field name="case_refused" eval="True"/>
|
||||
<field name="fold" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
|
Loading…
Reference in New Issue