diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-06-15 15:16:16 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-06-18 13:03:34 +0200 |
| commit | 80e97e98ce76067db1079af8feeef667cfadf837 (patch) | |
| tree | e261d34e3f8458bd99011f60f508bcce2c723baf /addons/product | |
| parent | 4a92a183e8631512a8b018eedaf9bf4956ca85e9 (diff) | |
[IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
Diffstat (limited to 'addons/product')
| -rw-r--r-- | addons/product/models/product_pricelist.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product/models/product_pricelist.py b/addons/product/models/product_pricelist.py index 1b2b0640284..d1ef0ec714c 100644 --- a/addons/product/models/product_pricelist.py +++ b/addons/product/models/product_pricelist.py @@ -521,7 +521,7 @@ class PricelistItem(models.Model): elif item.compute_price == 'percentage': item.price = _("%s %% discount", item.percent_price) else: - item.price = _("%s %% discount and %s surcharge") % (item.price_discount, item.price_surcharge) + item.price = _("%(percentage)s %% discount and %(price)s surcharge", percentage=item.price_discount, price=item.price_surcharge) @api.onchange('compute_price') def _onchange_compute_price(self): |
