[FIX] : tde's last remark correction
bzr revid: jem@openerp.com-20140226164521-gccablfi8b6e36qr
This commit is contained in:
parent
e799c68264
commit
f664ff2ace
|
@ -1,9 +1,23 @@
|
||||||
|
|
||||||
from openerp.osv import osv, fields
|
from openerp.osv import osv, fields
|
||||||
|
|
||||||
|
|
||||||
class crm_lead_to_project_issue_wizard(osv.TransientModel):
|
class crm_lead_to_project_issue_wizard(osv.TransientModel):
|
||||||
""" wizard to convert a Lead into a Project Issue and move the Mail Thread """
|
""" wizard to convert a Lead into a Project Issue and move the Mail Thread """
|
||||||
|
|
||||||
|
_name = "crm.lead2projectissue.wizard"
|
||||||
|
|
||||||
|
_inherit = 'crm.partner.binding'
|
||||||
|
|
||||||
|
_columns = {
|
||||||
|
"lead_id" : fields.many2one("crm.lead","Lead", domain=[("type","=","lead")]),
|
||||||
|
"project_id" : fields.many2one("project.project", "Project", domain=[("use_issues","=",True)])
|
||||||
|
}
|
||||||
|
|
||||||
|
_defaults = {
|
||||||
|
"lead_id" : lambda self, cr, uid, context=None: context.get('active_id')
|
||||||
|
}
|
||||||
|
|
||||||
def action_lead_to_project_issue(self, cr, uid, ids, context=None):
|
def action_lead_to_project_issue(self, cr, uid, ids, context=None):
|
||||||
# get the wizards and models
|
# get the wizards and models
|
||||||
wizards = self.browse(cr, uid, ids, context=context)
|
wizards = self.browse(cr, uid, ids, context=context)
|
||||||
|
@ -45,14 +59,3 @@ class crm_lead_to_project_issue_wizard(osv.TransientModel):
|
||||||
'context' : context
|
'context' : context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_name = "crm.lead2projectissue.wizard"
|
|
||||||
_inherit = 'crm.partner.binding'
|
|
||||||
_columns = {
|
|
||||||
"lead_id" : fields.many2one("crm.lead","Lead", domain=[("type","=","lead")]),
|
|
||||||
"project_id" : fields.many2one("project.project", "Project", domain=[("use_issues","=",True)])
|
|
||||||
}
|
|
||||||
|
|
||||||
_defaults = {
|
|
||||||
"lead_id" : lambda self, cr, uid, context=None: context.get('active_id')
|
|
||||||
}
|
|
|
@ -1822,7 +1822,7 @@ class mail_thread(osv.AbstractModel):
|
||||||
msg_ids_not_comment = message_obj.search(cr, uid, [
|
msg_ids_not_comment = message_obj.search(cr, uid, [
|
||||||
('model', '=', self._name),
|
('model', '=', self._name),
|
||||||
('res_id', '=', id),
|
('res_id', '=', id),
|
||||||
('subtype_id.id', '!=', subtype_res_id)], context=context)
|
('subtype_id', '!=', subtype_res_id)], context=context)
|
||||||
|
|
||||||
# update the messages
|
# update the messages
|
||||||
message_obj.write(cr, uid, msg_ids_comment, {"res_id" : new_res_id, "model" : new_model}, context=context)
|
message_obj.write(cr, uid, msg_ids_comment, {"res_id" : new_res_id, "model" : new_model}, context=context)
|
||||||
|
|
Loading…
Reference in New Issue