steps to reproduce the bug:
- Create a service product with "invoicing policy" set to "Based on timesheet" and "create on order" set to "project and task"
- Create and invoice with the product and confirm it
- Type in some hours on timesheets for the invoice
- Go Project -> Project update of the project, The margin value is incorrect
Solution: As the cost are always negative, changed the operation of the calculation to have the good value.
opw-3029869
closesodoo/odoo#104474
X-original-commit: a39a1a6a3bc276177f9f4c95495153bbb5818ed5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>