summaryrefslogtreecommitdiff
path: root/addons/sale_timesheet_edit/models/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/sale_timesheet_edit/models/project.py')
-rw-r--r--addons/sale_timesheet_edit/models/project.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/addons/sale_timesheet_edit/models/project.py b/addons/sale_timesheet_edit/models/project.py
new file mode 100644
index 00000000..b10bafdd
--- /dev/null
+++ b/addons/sale_timesheet_edit/models/project.py
@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import models
+
+
+class Project(models.Model):
+ _inherit = 'project.project'
+
+ def _get_not_billed_timesheets(self):
+ """ Get the timesheets not invoiced and the SOL has not manually been edited
+ FIXME: [XBO] this change must be done in the _update_timesheets_sale_line_id
+ rather than this method in master to keep the initial behaviour of this method.
+ """
+ return super(Project, self)._get_not_billed_timesheets() - self.mapped('timesheet_ids').filtered('is_so_line_edited')