Browse Source

[FIX] crm_partner_assign: message translation structure

Backport of 1989495 without breaking existing translations.
do not forward port in 9 where proper fix has been made at 1989495.

Do not generate the messages by putting bits of sentences together.
Other languages do not have the same structure (and 'have not' was not
translated anyway).

For 8.0 keep the same source for the base error message but create a new one for
the negation as it was wrong in other languages.
master
Martin Trigaux 6 years ago
parent
commit
8f7484b6af
  1. 8
      addons/crm_partner_assign/i18n/crm_partner_assign.pot
  2. 5
      addons/crm_partner_assign/wizard/crm_channel_interested.py

8
addons/crm_partner_assign/i18n/crm_partner_assign.pot

@ -68,11 +68,17 @@ msgid "<p>I am interested by this lead.</p>"
msgstr ""
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_channel_interested.py:52
#: code:addons/crm_partner_assign/wizard/crm_channel_interested.py:53
#, python-format
msgid "<p>I am not interested by this lead. I %scontacted the lead.</p>"
msgstr ""
#. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_channel_interested.py:55
#, python-format
msgid "<p>I am not interested by this lead. I have not contacted the lead.</p>"
msgstr ""
#. module: crm_partner_assign
#: field:crm.partner.report.assign,activation:0
#: view:res.partner:crm_partner_assign.view_res_partner_filter_assign

5
addons/crm_partner_assign/wizard/crm_channel_interested.py

@ -49,7 +49,10 @@ class crm_lead_forward_to_partner(osv.TransientModel):
values = {}
else:
stage = 'stage_portal_lead_recycle'
message = _('<p>I am not interested by this lead. I %scontacted the lead.</p>') % (not wizard.contacted and 'have not ' or '')
if wizard.contacted:
message = _('<p>I am not interested by this lead. I %scontacted the lead.</p>') % ''
else:
message = _('<p>I am not interested by this lead. I have not contacted the lead.</p>')
values = {'partner_assigned_id': False}
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
partner_ids = self.pool.get('res.partner').search(cr, SUPERUSER_ID, [('id', 'child_of', user.partner_id.commercial_partner_id.id)], context=context)

Loading…
Cancel
Save