[IMP] Re-open an pending or closed issue by email
bzr revid: stephane@openerp.com-20110114131622-105w96ifgniwdykc
This commit is contained in:
parent
1d5bb22c6f
commit
cf0e2e54b4
|
@ -410,7 +410,7 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
|
||||
return res
|
||||
|
||||
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
|
||||
def message_update(self, cr, uid, ids, vals=None, msg="", default_act='pending', context=None):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
|
@ -418,6 +418,9 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
@param ids: List of update mail’s IDs
|
||||
"""
|
||||
|
||||
if vals is None:
|
||||
vals = {}
|
||||
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
|
||||
|
@ -432,6 +435,12 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
'revenue': 'planned_revenue',
|
||||
'probability': 'probability'
|
||||
}
|
||||
|
||||
# Reassign the 'open' state to the case if this one is in pending or done
|
||||
for record in self.browse(cr, uid, ids, context=context):
|
||||
if record.state in ('pending', 'done'):
|
||||
record.write({'state' : 'open'})
|
||||
|
||||
vls = { }
|
||||
for line in msg['body'].split('\n'):
|
||||
line = line.strip()
|
||||
|
|
Loading…
Reference in New Issue