We have a project that are may require interventions out of the normal working hours. It has been agreed with the customer that at higher price will be billed in case of the need of working in such hours.
For now we have identified the following cases that will include a different price:
- Work is out of the daily working hours. For example company works from 9:00 to 17:00 but an intervention is requested at 22:00
- Work is requested on weekend.
- Work is requested on festive day. As festive we have national days (i.e: Chrismas day) but also festive days that are linked to the city where the company (city local festive day).
To be able to generate the right invoices we need to:
- Define on the company the working hours and days. So we must add following fields: Working days (multiselection of
ir.calendar.day
), Working Start Time and Working End Time. - A new model to define the festive days for the company. We may name it: Working Calendar, and contain the following fields: Company, Date and Name.
- For each timesheet line we may add a new field to define the type: Normal/Festive/Extra Hours/etc. The system should be able to compute most of the times based on previous rules, but the user should be able to review them manually later.
- On project, define a diferent price (or event products) for each type of work, so when generating the invoice different invoice lines will be created.
For now, it is not possible to implement point 4 as the invoice api does not manage different types of lines for the same work but it can be easly refactored.
Having say that I think all other points are also interested to be part of standard modules. For example the working calendar can be used as base for the Payroll management feature we already discussed.
Toughts?