Hi I am running Odoo 15
This is my first foray in adding custom fields to Odoo while using developer mode. I have been playing around to customize the list that is displayed in the timesheets module. My end goal is to add an hourly rate field and turnover field which will be both computed fields and included in the list.
I have created both these custom fields, x_hourly_rate and x_turnover, with the corresponding python code related to the computation shown below. Nothing is being displayed in shown in the list ( I have added these fields in the list). Code attached below. Any ideas? Thanks
(x_hourly_rate)
for record in self: hourly = 0
if record.employee_id == "Michael":
hourly = 10
elif record.employee_id == "Denis":
hourly = 15
else:
hourly = 17
record.x_hourly_rate = hourly