From 22090d3648f4d8cc34104f33b23fce70812d3be6 Mon Sep 17 00:00:00 2001 From: Tanguy Charlier Date: Mon, 18 Jul 2016 11:00:27 +0200 Subject: [PATCH] [FIX] sale_timesheet: don't count expenses as timesheets On sale orders, the timesheets stat button should display the number of related timesheets. 0b55f2ee6d55365ae0f06473585d543f1cc7b259 changed the computation system to have the number of timesheets instead of the total time for several reasons, but used a domain which also includes expenses. This commit changes the domain to make sure that the stat button only displays the number of timesheets, and that the action leads to a list view of timesheets only. --- addons/sale_timesheet/models/sale_timesheet.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/sale_timesheet/models/sale_timesheet.py b/addons/sale_timesheet/models/sale_timesheet.py index 35ea7d84483..a5b80567d40 100644 --- a/addons/sale_timesheet/models/sale_timesheet.py +++ b/addons/sale_timesheet/models/sale_timesheet.py @@ -110,7 +110,6 @@ class SaleOrder(models.Model): if order.project_id: order.timesheet_ids = self.env['account.analytic.line'].search( [('so_line', 'in', order.order_line.ids), - '|', ('amount', '<=', 0.0), ('project_id', '!=', False)]) else: