[FIX] sale_timesheet: don't count expenses as timesheets
On sale orders, the timesheets stat button should display the number of related timesheets.
0b55f2ee6d 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.
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user