[FIX] sale_timesheet: remove the down payment line in project overview

Before this commit, in project overview, there was an advance payment
line under 'Timesheets' section which was unnecessary for the timesheet.

After this commit, down payment line will not considered in project overview.

task-1957272

closes odoo/odoo#34062

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
This commit is contained in:
shreya thakrar
2019-06-13 09:16:05 +00:00
committed by Mohammed Shekha
parent 988018a5ba
commit ffeb855bc7
+1 -1
View File
@@ -328,7 +328,7 @@ class SaleTimesheetController(http.Controller):
def _table_get_empty_so_lines(self, projects):
""" get the Sale Order Lines having no timesheet but having generated a task or a project """
so_lines = projects.sudo().mapped('sale_line_id.order_id.order_line').filtered(lambda sol: sol.is_service and not sol.is_expense)
so_lines = projects.sudo().mapped('sale_line_id.order_id.order_line').filtered(lambda sol: sol.is_service and not sol.is_expense and not sol.is_downpayment)
return set(so_lines.ids), set(so_lines.mapped('order_id').ids)
# --------------------------------------------------