[FIX] sale_timesheet: no product on timesheet line
Timesheet lines are meant to have no product, and instead rely on an implicit "Service" product. The UoM used is the company's project UOM (project_time_mode_id), and the nominal cost of this product is set on each employee. Forcefully using the SO product as was done before is useless and actually caused inconsistencies. The `unit_amount` value would be expected in the UoM of the SO product, while still being computed/set in the company's project UoM. When no nominal cost can be found for an employee, the cost is assumed to be 0, so the `amount` value is 0 too. In addition, the product field is not supposed to be visible on any form where timesheet lines are recorded. This patch fixes various bits of logic related to this, including parts which expected the `amount` value to be non-zero, or the product to be set.
Loading
Please register or sign in to comment