diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml index 0eec6d27785..9aa1a4b720f 100644 --- a/addons/account/edi/invoice_action_data.xml +++ b/addons/account/edi/invoice_action_data.xml @@ -123,7 +123,7 @@ ]]> - ]]> Password reset - ')]) context.update({'active_model': 'crm.lead','active_id': lead_ids[0]}) - id = self.create(cr, uid, {'body_text': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context) + id = self.create(cr, uid, {'body': "Merci à l'intérêt pour notre produit.nous vous contacterons bientôt. Merci", 'email_from': 'sales@mycompany.com'}, context=context) try: self.send_mail(cr, uid, [id], context=context) except: diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index a7ea3d619e7..39347f8b26a 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -194,7 +194,7 @@ class crm_claim(base_stage, osv.osv): if custom_values is None: custom_values = {} custom_values.update({ 'name': msg.get('subject') or _("No Subject"), - 'description': msg.get('body_text'), + 'description': msg.get('body'), 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), }) @@ -219,7 +219,7 @@ class crm_claim(base_stage, osv.osv): 'revenue': 'planned_revenue', 'probability':'probability' } - for line in msg['body_text'].split('\n'): + for line in msg['body'].split('\n'): line = line.strip() res = tools.misc.command_re.match(line) if res and maps.get(res.group(1).lower()): diff --git a/addons/crm_claim/test/ui/claim_demo.yml b/addons/crm_claim/test/ui/claim_demo.yml index ad8fdf3aa44..6b6d380f5be 100644 --- a/addons/crm_claim/test/ui/claim_demo.yml +++ b/addons/crm_claim/test/ui/claim_demo.yml @@ -9,7 +9,7 @@ - !python {model: crm.claim}: | try: - self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body_text': 'first training session completed',}) + self.message_update(cr, uid,[ref('crm_claim_4')], {'subject': 'Claim Update record','body': 'first training session completed',}) except: pass - \ No newline at end of file + diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index e219263d841..d80bd555811 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -105,7 +105,7 @@ class crm_helpdesk(base_state, osv.osv): if custom_values is None: custom_values = {} custom_values.update({ 'name': msg.get('subject') or _("No Subject"), - 'description': msg.get('body_text'), + 'description': msg.get('body'), 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'user_id': False, @@ -129,7 +129,7 @@ class crm_helpdesk(base_state, osv.osv): 'revenue': 'planned_revenue', 'probability':'probability' } - for line in msg['body_text'].split('\n'): + for line in msg['body'].split('\n'): line = line.strip() res = tools.misc.command_re.match(line) if res and maps.get(res.group(1).lower()): diff --git a/addons/crm_helpdesk/test/process/help-desk.yml b/addons/crm_helpdesk/test/process/help-desk.yml index 320bd61c2af..4fd6a9ee9d7 100644 --- a/addons/crm_helpdesk/test/process/help-desk.yml +++ b/addons/crm_helpdesk/test/process/help-desk.yml @@ -23,7 +23,7 @@ !python {model: crm.helpdesk}: | question_ids = self.search(cr, uid, [('email_from','=', 'Mr. John Right ')]) try: - self.message_update(cr, uid, question_ids, {'subject': 'Link of product', 'body_text': 'www.openerp.com'}) + self.message_update(cr, uid, question_ids, {'subject': 'Link of product', 'body': 'www.openerp.com'}) except: pass diff --git a/addons/crm_partner_assign/i18n/crm_partner_assign.pot b/addons/crm_partner_assign/i18n/crm_partner_assign.pot index 3fb9fc0e915..c3ddc66fa3b 100644 --- a/addons/crm_partner_assign/i18n/crm_partner_assign.pot +++ b/addons/crm_partner_assign/i18n/crm_partner_assign.pot @@ -72,7 +72,7 @@ msgid "Geo Localize" msgstr "" #. module: crm_partner_assign -#: help:crm.lead.forward.to.partner,body_text:0 +#: help:crm.lead.forward.to.partner,body:0 msgid "Plain-text version of the message" msgstr "" @@ -129,7 +129,7 @@ msgid "Highest" msgstr "" #. module: crm_partner_assign -#: field:crm.lead.forward.to.partner,body_text:0 +#: field:crm.lead.forward.to.partner,body:0 msgid "Text contents" msgstr "" diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py index d479f8b1bd5..ce6087cad69 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py @@ -62,9 +62,9 @@ class crm_lead_forward_to_partner(osv.osv_memory): res_id = context.get('active_id') model = context.get('active_model') lead = self.pool.get(model).browse(cr, uid, res_id, context) - body_text = self._get_message_body_text(cr, uid, lead, history_type, context=context) - if body_text: - res = {'value': {'body_text' : body_text}} + body = self._get_message_body(cr, uid, lead, history_type, context=context) + if body: + res = {'value': {'body' : body}} return res def on_change_partner(self, cr, uid, ids, partner_id): @@ -99,7 +99,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): mode = context.get('mail.compose.message.mode') if mode == 'mass_mail': lead_ids = context and context.get('active_ids', []) or [] - value = self.default_get(cr, uid, ['body_text', 'email_to', 'email_cc', 'subject', 'history'], context=context) + value = self.default_get(cr, uid, ['body', 'email_to', 'email_cc', 'subject', 'history'], context=context) self.write(cr, uid, ids, value, context=context) context['mail.compose.message.mode'] = mode @@ -125,7 +125,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): lead.write(cr, uid, [case.id], update_vals, context=context) return res - def _get_info_body_text(self, cr, uid, lead, context=None): + def _get_info_body(self, cr, uid, lead, context=None): field_names = [] proxy = self.pool.get(lead._name) if lead.type == 'opportunity': @@ -135,14 +135,14 @@ class crm_lead_forward_to_partner(osv.osv_memory): 'zip', 'city', 'country_id', 'state_id', 'email_from', 'phone', 'fax', 'mobile', 'categ_id', 'description', ] - return proxy._mail_body_text(cr, uid, lead, field_names, context=context) + return proxy._mail_body(cr, uid, lead, field_names, context=context) - def _get_message_body_text(self, cr, uid, lead, mode='whole', context=None): + def _get_message_body(self, cr, uid, lead, mode='whole', context=None): """This function gets whole communication history and returns as top posting style """ mail_message = self.pool.get('mail.message') message_ids = [] - body = self._get_info_body_text(cr, uid, lead, context=context) + body = self._get_info_body(cr, uid, lead, context=context) if mode in ('whole', 'latest'): message_ids = lead.message_ids message_ids = map(lambda x: x.id, filter(lambda x: x.email_from, message_ids)) @@ -153,7 +153,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): sender = 'From: %s' %(message.email_from or '') to = 'To: %s' % (message.email_to or '') sentdate = 'Date: %s' % (message.date or '') - desc = '\n%s'%(message.body_text) + desc = '\n%s'%(message.body) original = [header, sender, to, sentdate, desc, '\n'] original = '\n'.join(original) body += original @@ -174,7 +174,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): email_cc = res.get('email_cc', "") email = res.get('email_to', "") subject = '%s: %s - %s' % (_('Fwd'), 'Lead forward', lead.name) - body = self._get_message_body_text(cr, uid, lead, body_type, context=context) + body = self._get_message_body(cr, uid, lead, body_type, context=context) partner_assigned_id = lead.partner_assigned_id and lead.partner_assigned_id.id or False user_id = False if not partner_assigned_id: @@ -187,7 +187,7 @@ class crm_lead_forward_to_partner(osv.osv_memory): res.update({ 'subject' : subject, - 'body_text' : body, + 'body' : body, 'email_cc' : email_cc, 'email_to' : email, 'partner_assigned_id': partner_assigned_id, diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml index cecf73954e5..f415a00c680 100644 --- a/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml +++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner_view.xml @@ -32,7 +32,7 @@ - +