[FIX] crm: typo + duplicate line due to bad merge + bad hardcoded models
bzr revid: odo@openerp.com-20120308155835-j9j5jh89p80i0ma5
This commit is contained in:
parent
86a7978d2d
commit
a68bbb65f4
|
@ -488,8 +488,8 @@ class crm_case(crm_base):
|
|||
dest = case.user_id.user_email or ""
|
||||
body = case.description or ""
|
||||
for message in case.message_ids:
|
||||
if message.email_from:
|
||||
body = message.description
|
||||
if message.email_from and message.body_text:
|
||||
body = message.body_text
|
||||
break
|
||||
|
||||
if not destination:
|
||||
|
@ -516,7 +516,7 @@ class crm_case(crm_base):
|
|||
[dest],
|
||||
subject,
|
||||
body,
|
||||
model='crm.case',
|
||||
model=self._name,
|
||||
reply_to=case.section_id.reply_to,
|
||||
res_id=case.id,
|
||||
attachments=attach_to_send,
|
||||
|
|
|
@ -59,7 +59,7 @@ class base_action_rule(osv.osv):
|
|||
reply_to = emailfrom
|
||||
if not emailfrom:
|
||||
raise osv.except_osv(_('Error!'), _("No E-Mail Found for your Company address!"))
|
||||
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id)
|
||||
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model=obj._name, reply_to=reply_to, res_id=obj.id)
|
||||
|
||||
def do_check(self, cr, uid, action, obj, context=None):
|
||||
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
|
||||
|
@ -90,7 +90,6 @@ class base_action_rule(osv.osv):
|
|||
return ok
|
||||
|
||||
def do_action(self, cr, uid, action, model_obj, obj, context=None):
|
||||
res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
|
||||
write = {}
|
||||
if hasattr(action, 'act_section_id') and action.act_section_id:
|
||||
obj.section_id = action.act_section_id
|
||||
|
|
Loading…
Reference in New Issue