From 642b63e6c2af480e13c87b9f7916f79b70607b71 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 10 Jan 2017 16:36:07 +0100 Subject: [PATCH] FIX translation method (bug reported by yvaucher) --- account_partner_required/models/account.py | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/account_partner_required/models/account.py b/account_partner_required/models/account.py index a2eb5849..dbeff893 100644 --- a/account_partner_required/models/account.py +++ b/account_partner_required/models/account.py @@ -51,20 +51,18 @@ class AccountMoveLine(models.Model): continue policy = line.account_id.get_partner_policy() if policy == 'always' and not line.partner_id: - return _("Partner policy is set to 'Always' " - "with account '%s' but the " - "partner is missing in the account " - "move line with label '%s'." % - (line.account_id.name_get()[0][1], - line.name)) + return _( + "Partner policy is set to 'Always' with account '%s' but " + "the partner is missing in the account move line with " + "label '%s'.") % (line.account_id.name_get()[0][1], + line.name) elif policy == 'never' and line.partner_id: - return _("Partner policy is set to 'Never' " - "with account '%s' but the " - "account move line with label '%s' " - "has a partner '%s'." % - (line.account_id.name_get()[0][1], - line.name, - line.partner_id.name)) + return _( + "Partner policy is set to 'Never' with account '%s' but " + "the account move line with label '%s' has a partner " + "'%s'.") % (line.account_id.name_get()[0][1], + line.name, + line.partner_id.name) @api.multi @api.constrains('partner_id', 'account_id', 'debit', 'credit')