From f9ec85614b7c55d882e1216f8fc18c73a0ad57df Mon Sep 17 00:00:00 2001 From: niyasraphy Date: Sat, 17 Dec 2022 06:55:05 +0000 Subject: [PATCH] [FIX] repair, sale, stock: translatable string and typo currently the returned warning from the sale, stock and repair apps are not translatable to user languages. this pr makes the string's translatable and correct the grammer of the warning. closes odoo/odoo#108379 X-original-commit: 217115e68d117d7cf1eeb94794118819d6082547 Signed-off-by: Victor Feyens (vfe) --- addons/repair/models/repair.py | 2 +- addons/stock/models/stock_move.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/repair/models/repair.py b/addons/repair/models/repair.py index f27ccd5fe4d..615e213a2b1 100644 --- a/addons/repair/models/repair.py +++ b/addons/repair/models/repair.py @@ -196,7 +196,7 @@ class Repair(models.Model): picking_warehouse = self.picking_id.location_dest_id.warehouse_id if location_warehouse and picking_warehouse and location_warehouse != picking_warehouse: return { - 'warning': {'title': "Warning", 'message': "Note that the warehouse of the return and repair locations don't match!"}, + 'warning': {'title': _("Warning"), 'message': _("Note that the warehouses of the return and repair locations don't match!")}, } @api.depends('product_id') diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index 095e1d82dea..e6f9cd6c901 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -1093,7 +1093,7 @@ Please change the quantity done or the rounding precision of your unit of measur if self.product_uom.factor > self.product_id.uom_id.factor: return { 'warning': { - 'title': "Unsafe unit of measure", + 'title': _("Unsafe unit of measure"), 'message': _("You are using a unit of measure smaller than the one you are using in " "order to stock your product. This can lead to rounding problem on reserved quantity. " "You should use the smaller unit of measure possible in order to valuate your stock or "