[FIX] l10n_be_hr_payroll_fleet: Don't display costs in model name

This is confusing for end users because on the fleet form/kanban view the
model is displayed. The information displayed in the name is the default
depreciated cost on the model. But in reality the depreciated cost of the
car could be different.
This commit is contained in:
Yannick Tivisse
2018-04-17 13:29:04 +02:00
parent ec02710b86
commit b5d026be7f
@@ -139,19 +139,6 @@ class FleetVehicleModel(models.Model):
for model in self:
model.default_total_depreciated_cost = model.co2_fee + model.default_recurring_cost_amount_depreciated
@api.multi
@api.depends('name', 'brand_id', 'default_total_depreciated_cost')
def name_get(self):
res = super(FleetVehicleModel, self).name_get()
new_res = []
for res_item in res:
model = self.browse(res_item[0])
if model.default_total_depreciated_cost != 0.0:
new_res.append((res_item[0], res_item[1] + u" \u2022 " + str(round(model.default_total_depreciated_cost, 2))))
else:
new_res.append(res_item)
return new_res
@api.depends('default_co2')
def _compute_co2_fee(self):
for model in self: