Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Fleet

Entity: fleet.vehicle.model

Compute Method: _compute_co2_emission_unit

View 20.0
Inputs Method Outputs
  • range_unit
+ for record in self:
+             if record.range_unit == 'km':
+                 record.co2_emission_unit = 'g/km'
+             else:
+                 record.co2_emission_unit = 'g/mi'
  • co2_emission_unit

Back to entity