timesheet module was initially designed to be used by both
It was done on the old time by using the removed
_inherits feature and now it is done with the manual creation of a timesheet work linked to the project work.
The idea is to propose a new design that will allow to use the
timesheet module for any module (like
production to record time spend).
We simplify the
timesheet.work to be a flat list of records with only a
Reference field to other models (like
timesheet.work will be computed by using the
rec_name of the reference. So the search on
rec_name should also do the search on all reference models (like the global search).
A unique constraint will be added on this
Reference field and the
A Mixin will be created for the model that wants to be linked to
timesheet.work. It will automatically create the
timesheet.work on create and delete it on delete. But also this creation/deletion will be condition to a property to allow to create for example a project on which it is not allowed to register timesheet lines.
The start/end date of
timesheet.work will stay.
We should also allow to create
timesheet.work without any reference, in this case a name is required.
This is for the purpose of recurring work like secretary.
- Drop required on
- Fill the
referencefield with the linked
- Remove the