diff options
| author | Goffin Simon <sig@odoo.com> | 2020-11-05 15:47:28 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-11-10 13:23:33 +0000 |
| commit | 46d254e79900cbb76521d8e6b00f7c7597a914c9 (patch) | |
| tree | a643fe060adc5118ece268d16291e730e39ba0ee | |
| parent | 958b8c5b475b037b3bf8d8bc8b87bf9501ccb779 (diff) | |
[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: Simon Goffin (sig) <sig@openerp.com>
| -rw-r--r-- | addons/sale_timesheet/models/project_overview.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_timesheet/models/project_overview.py b/addons/sale_timesheet/models/project_overview.py index d3b58dd3097..0d7d36cf100 100644 --- a/addons/sale_timesheet/models/project_overview.py +++ b/addons/sale_timesheet/models/project_overview.py @@ -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 |
