[ADD]Added Upstream Patch for l10n_be_hr_payroll_fleet module.
This commit is contained in:
parent
7bd08a0951
commit
f6612b79db
@ -13,7 +13,8 @@ class FleetVehicle(models.Model):
|
||||
|
||||
co2_fee = fields.Float(compute='_compute_co2_fee', string="CO2 Fee")
|
||||
total_depreciated_cost = fields.Float(compute='_compute_total_depreciated_cost',
|
||||
string="Total Cost (Depreciated)", help="This includes all the depreciated costs and the CO2 fee")
|
||||
string="Total Cost (Depreciated)", track_visibility="onchange",
|
||||
help="This includes all the depreciated costs and the CO2 fee")
|
||||
total_cost = fields.Float(compute='_compute_total_cost', string="Total Cost", help="This include all the costs and the CO2 fee")
|
||||
fuel_type = fields.Selection(required=True, default='diesel')
|
||||
atn = fields.Float(compute='_compute_car_atn', string="ATN")
|
||||
|
@ -25,7 +25,7 @@ class HrContract(models.Model):
|
||||
'car_id.log_contracts.recurring_cost_amount_depreciated') # the fleet vehicle to avoid these dependencies
|
||||
def _compute_car_atn_and_costs(self):
|
||||
for contract in self:
|
||||
if contract.car_id:
|
||||
if not contract.new_car and contract.car_id:
|
||||
contract.car_atn = contract.car_id.atn
|
||||
contract.company_car_total_depreciated_cost = contract.car_id.total_depreciated_cost
|
||||
elif contract.new_car and contract.new_car_model_id:
|
||||
|
Loading…
Reference in New Issue
Block a user