[FIX] crm_partner_assign: message translation structure

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).
This commit is contained in:
Martin Trigaux
2015-09-10 11:34:28 +02:00
parent 9b2b238b15
commit 1989495aeb
@@ -31,7 +31,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 contacted 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)