[FIX] hr_recruitment, project_issue, crm_phonecall: fixes related to the removal of base_state/base_stage and all case_ methods
bzr revid: tde@openerp.com-20130813094747-dm06sx2glgdgal9m
This commit is contained in:
parent
689b0b67ec
commit
9194308cd4
|
@ -141,7 +141,7 @@ class crm_phonecall(osv.osv):
|
||||||
}
|
}
|
||||||
new_id = self.create(cr, uid, vals, context=context)
|
new_id = self.create(cr, uid, vals, context=context)
|
||||||
if action == 'log':
|
if action == 'log':
|
||||||
self.case_close(cr, uid, [new_id])
|
self.write(cr, uid, [new_id], {'state': 'done'}, context=context)
|
||||||
phonecall_dict[call.id] = new_id
|
phonecall_dict[call.id] = new_id
|
||||||
return phonecall_dict
|
return phonecall_dict
|
||||||
|
|
||||||
|
@ -249,12 +249,11 @@ class crm_phonecall(osv.osv):
|
||||||
'email_from': default_contact and default_contact.email,
|
'email_from': default_contact and default_contact.email,
|
||||||
})
|
})
|
||||||
vals = {
|
vals = {
|
||||||
'partner_id': partner_id,
|
'partner_id': partner_id,
|
||||||
'opportunity_id' : opportunity_id,
|
'opportunity_id': opportunity_id,
|
||||||
|
'state': 'done',
|
||||||
}
|
}
|
||||||
self.write(cr, uid, [call.id], vals)
|
self.write(cr, uid, [call.id], vals, context=context)
|
||||||
self.case_close(cr, uid, [call.id])
|
|
||||||
opportunity.case_open(cr, uid, [opportunity_id])
|
|
||||||
opportunity_dict[call.id] = opportunity_id
|
opportunity_dict[call.id] = opportunity_id
|
||||||
return opportunity_dict
|
return opportunity_dict
|
||||||
|
|
||||||
|
|
|
@ -50,14 +50,6 @@
|
||||||
<field name="create_date" invisible="1"/>
|
<field name="create_date" invisible="1"/>
|
||||||
<field name="opportunity_id" invisible="1"/>
|
<field name="opportunity_id" invisible="1"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
<button name="case_open" string="Confirm" type="object"
|
|
||||||
states="draft,pending" icon="gtk-go-forward"/>
|
|
||||||
<button name="case_close" string="Held" type="object"
|
|
||||||
states="open,pending" icon="gtk-jump-to"/>
|
|
||||||
<button name="case_cancel" string="Cancel" type="object"
|
|
||||||
states="draft,open,pending" icon="gtk-cancel"/>
|
|
||||||
<button name="case_reset" string="Reset to Todo" type="object"
|
|
||||||
states="cancel" icon="gtk-convert"/>
|
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
-
|
-
|
||||||
!python {model: crm.meeting}: |
|
!python {model: crm.meeting}: |
|
||||||
context.update({'active_model': 'crm.meeting'})
|
context.update({'active_model': 'crm.meeting'})
|
||||||
self.case_open(cr, uid, [ref('base_calendar.crm_meeting_4')])
|
self.write(cr, uid, [ref('base_calendar.crm_meeting_4')], {'state': 'open'})
|
||||||
-
|
-
|
||||||
I invite a user for meeting.
|
I invite a user for meeting.
|
||||||
-
|
-
|
||||||
|
|
|
@ -66,8 +66,6 @@ class hr_recruitment_partner_create(osv.osv_memory):
|
||||||
case_obj.write(cr, uid, [case.id], {
|
case_obj.write(cr, uid, [case.id], {
|
||||||
'partner_id': partner_id,
|
'partner_id': partner_id,
|
||||||
}, context=context)
|
}, context=context)
|
||||||
if data['close']:
|
|
||||||
case_obj.case_close(cr, uid, context['active_ids'])
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'domain': "[]",
|
'domain': "[]",
|
||||||
|
|
|
@ -465,7 +465,6 @@ class project_issue(osv.Model):
|
||||||
self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
|
self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
|
||||||
else:
|
else:
|
||||||
raise osv.except_osv(_('Warning!'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
|
raise osv.except_osv(_('Warning!'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
|
||||||
self.case_set(cr, uid, ids, 'draft', data, context=context)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue