[FIX] project_issue: fix inconsistent data (stage & state should be syncro as state is a fields.related)

bzr revid: qdp-launchpad@openerp.com-20121018135728-jaynrxb88550ydgt
This commit is contained in:
Quentin (OpenERP) 2012-10-18 15:57:28 +02:00
parent e25d11022f
commit a292f894ef
1 changed files with 1 additions and 2 deletions

View File

@ -275,7 +275,6 @@ class project_issue(base_stage, osv.osv):
'active': 1,
'partner_id': lambda s, cr, uid, c: s._get_default_partner(cr, uid, c),
'email_from': lambda s, cr, uid, c: s._get_default_email(cr, uid, c),
'state': 'draft',
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
@ -332,7 +331,7 @@ class project_issue(base_stage, osv.osv):
})
vals = {
'task_id': new_task_id,
'state':'pending'
'stage_id': self.stage_find(cr, uid, [bug], bug.project_id.id, [('state', '=', 'pending')], context=context),
}
self.convert_to_task_send_note(cr, uid, [bug.id], context=context)
case_obj.write(cr, uid, [bug.id], vals, context=context)