← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 578106] Re: [CRM module] case description is "False" in mail notification

 

Jean-Christophe VASSORT,,

What I'm doing now is:

1) edit addons/crm/crm.py

change in format_mail method:

 'case_description': case.description,

with:

'case_description': case.description or case.email_last,

2) edit addons/crm/scripts/openerp-mailgate/openerp-mailgate.py

there are two places where the crm case state is changed and then the case is updated with:
self.rpc('crm.case', act, [id])
self.rpc('crm.case', 'write', [id], data)

I have reversed the order of the calls:

self.rpc('crm.case', 'write', [id], data)
self.rpc('crm.case', act, [id])

As my rules are after a state change I needed the data of the case to
saved first.

I don't know if it is the "proper" way to fix it but it seems to be
working. Also, I don't think there will be an official fix for this as
this has changed in v6 and they're not fixing a lot of v5 stuff.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/578106

Title:
  [CRM module] case description is "False" in mail notification

Status in openerp-france-localisation:
  New

Bug description:
  In CRM module, I created Cases Sections and I use the email gateway.

  I created a rule to be notified when a new case was come.

  It works but in the mail body,  the special keyword
  "%(case_description)s" returns "false" instead of the case content.

  I noticed when the mail is sent, datas are not yet written in DB.

  I changed the openerp-mailgate.py file to obtain what I wanted.