From a56dfd43a23af16e7247a7b040cc8d2b60e1f616 Mon Sep 17 00:00:00 2001 From: Aman Patel Date: Thu, 14 Sep 2023 07:04:11 +0000 Subject: [PATCH] [FIX] fleet: change Co2 text to CO2 Steps: - Install fleet. - Create new. Select a car. - Goto `Model` page. - Below CO2 Emissions string there is Co2 Standard string. Issue: - In the Engine section, there is a `CO2 Emissions` and a `Co2 Standard` field. If these are both referring to carbon dioxide, then they should be written consistently in the same format (CO2). Currently, one has a lowercase `o` while the other (correct) one has a capital `O`. Fix: We are adding the necessary string. task-3498197 closes odoo/odoo#139761 X-original-commit: 8b4a22baa92f196361f1ef622b55312015cf8128 Signed-off-by: Yannick Tivisse (yti) --- addons/fleet/i18n/fleet.pot | 6 +++++- addons/fleet/models/fleet_vehicle.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/fleet/i18n/fleet.pot b/addons/fleet/i18n/fleet.pot index e3cca3feb6c..31975601ba1 100644 --- a/addons/fleet/i18n/fleet.pot +++ b/addons/fleet/i18n/fleet.pot @@ -304,6 +304,11 @@ msgstr "" msgid "CO2 Emissions g/km" msgstr "" +#. module: fleet +#: model:ir.model.fields,field_description:fleet.field_fleet_vehicle__co2_standard +msgid "CO2 Standard" +msgstr "" + #. module: fleet #: model:ir.model.fields,help:fleet.field_fleet_vehicle__co2 msgid "CO2 emissions of the vehicle" @@ -417,7 +422,6 @@ msgid "Closed" msgstr "" #. module: fleet -#: model:ir.model.fields,field_description:fleet.field_fleet_vehicle__co2_standard #: model:ir.model.fields,field_description:fleet.field_fleet_vehicle_model__co2_standard msgid "Co2 Standard" msgstr "" diff --git a/addons/fleet/models/fleet_vehicle.py b/addons/fleet/models/fleet_vehicle.py index b51ebcc4fb1..bb6cd431e59 100644 --- a/addons/fleet/models/fleet_vehicle.py +++ b/addons/fleet/models/fleet_vehicle.py @@ -89,7 +89,7 @@ class FleetVehicle(models.Model): horsepower_tax = fields.Float('Horsepower Taxation', compute='_compute_model_fields', store=True, readonly=False) power = fields.Integer('Power', help='Power in kW of the vehicle', compute='_compute_model_fields', store=True, readonly=False) co2 = fields.Float('CO2 Emissions', help='CO2 emissions of the vehicle', compute='_compute_model_fields', store=True, readonly=False, tracking=True, group_operator=None) - co2_standard = fields.Char(compute='_compute_model_fields', store=True, readonly=False) + co2_standard = fields.Char('CO2 Standard', compute='_compute_model_fields', store=True, readonly=False) category_id = fields.Many2one('fleet.vehicle.model.category', 'Category', compute='_compute_model_fields', store=True, readonly=False) image_128 = fields.Image(related='model_id.image_128', readonly=True) contract_renewal_due_soon = fields.Boolean(compute='_compute_contract_reminder', search='_search_contract_renewal_due_soon',