Skip to content
Snippets Groups Projects
Commit 46d254e7 authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] sale_timesheet: Non billable task in project Overview


Steps to reproduce the bug:

- Let's consider a product P with price=100€, Timesheets on tasks and Create a task in sales order's project
- Create a SO with 1 P and confirm it
- A project PR and a task T have been created
- Assign an employee E to T and record 01:00 hour
- Create an invoice I from the SO and confirm I
- Go to the project overview of the SO

Bug:

100€ was counted twice in Non billable task and in Billed on Timesheets

PS:

When validating I, an analytic line L is created and L is not linked to PR.
That's why 100€ was counted twice because L was counted once in the 'Invoiced' part
and once in the 'Other revenue'

opw:2370418

closes odoo/odoo#61433

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent 958b8c5b
Branches
Tags
No related merge requests found
......@@ -103,7 +103,7 @@ class Project(models.Model):
profit['cost'] += data.get('timesheet_cost', 0.0)
profit['expense_cost'] += data.get('expense_cost', 0.0)
profit['expense_amount_untaxed_invoiced'] += data.get('expense_amount_untaxed_invoiced', 0.0)
profit['other_revenues'] = other_revenues or 0
profit['other_revenues'] = other_revenues - data.get('amount_untaxed_invoiced', 0.0) if other_revenues else 0.0
profit['total'] = sum([profit[item] for item in profit.keys()])
dashboard_values['profit'] = profit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment