Billing the Hours to a Customer
This part joins Timesheets and Sales (module sale_timesheet). The idea: the customer orders a number of hours, the team writes the hours that it really works, and the invoice is for the hours that were done.
The Service Product
In the Sales app we made a product, Design Hour (Timesheets), of the type Service, at $60.00 a unit. Three fields do the work. The picture is its form.
Create on Order. What Odoo makes when an order with this product is confirmed. The choices are Nothing, Event Registration, Subcontracting RFQ, Repair Order, Task, Project & Task, and Project. We chose Task.
Project. The project where the task is made: Showroom Renovation.
Task Template. An optional model of task. We left it empty.
Invoicing Policy. Based on Timesheets. The help text says: Invoice based on timesheets (delivered quantity). Create a task in an existing project to track the time spent. The other choices are Prepaid/Fixed Price and Based on Milestones.
The Order and the Task
We made the sales order S00235 for Emma Clarke, with 10 units of the product, and confirmed it (the Sales chapters show how to do it). Odoo made the task S00235 - Design Hour (Timesheets) in the project Showroom Renovation. It has the customer, a smart button Sales Order, the field Sales Order Item filled with the line of the order, and the Allocated Time of 10 hours, which is the quantity ordered.
The chatter of the task says that it was created from the order. Nobody is assigned yet. In a real company the project manager assigns the task.
Writing the Hours
In the tab Timesheets of the task, we wrote four hours: the description Design work for the showroom and the time 4:00. The Allocated Time shows 40%, the Time Spent is 4 hours and the Time Remaining is 6 hours. The new line has no field to choose for the order: Odoo linked it to the Sales Order Item of the task by itself.
The Order Shows the Hours That Were Done
The button Sales Order opens the order. It has smart buttons 1 Projects / 1 Tasks and Recorded 4 Hours. The line of the order says Quantity (ordered) 10.00, Delivered 4.00 and Invoiced 0.00, at $60.00 with the tax of 15%. So the delivered quantity follows the hours of the timesheets.
The button Create Invoice opens a window with the choices Regular invoice, Down payment (percentage) and Down payment (fixed amount), and a field Timesheets Period (a start and an end date that limit the hours that are billed). We chose Regular invoice, left the period empty and clicked Create Draft.
Odoo made the draft invoice (Draft Invoice (S00235)). It has one line, Design Hour (Timesheets), with the quantity 4.00 (the delivered hours, not the 10 ordered), at $60.00. The amount is $240.00, the tax $36.00 and the total $276.00. The line carries the analytic account of the project (a green tag Showroom...), so the income shows in the costs and profit of the project. The buttons are Confirm and Cancel, and the smart buttons Sale Orders and Recorded 4 Hours bring you back to the order and the hours.
The invoice stays as a draft until you confirm it (the Accounting chapters show the posting and the payment). Now open the report By Billing Type again. It has two columns: Timesheets (Time & Materials) with 4h (the hours of the order) and Timesheets (Non-Billable) with 4h 15m, 8h 15m in all. So the report separates the hours that are sold from the hours that are not.