- You're reading the "company_id" in an account.analytic.account, but the "company_id" field is not required on that object, so make sure there is one, otherwise the final "company[0]" will crash.
- You should move that code into "hr_timesheet" module, because here we're inheriting from "hr.analytic.timesheet" object, and your code don't depend on new fields introduce by "hr_timesheet_sheet" module.
Hello Ila,
Two things that needd to be fixed:
- You're reading the "company_id" in an account. analytic. account, but the "company_id" field is not required on that object, so make sure there is one, otherwise the final "company[0]" will crash.
- You should move that code into "hr_timesheet" module, because here we're inheriting from "hr.analytic. timesheet" object, and your code don't depend on new fields introduce by "hr_timesheet_ sheet" module.
Regards,
Xavier