From 74f07717d096c280fbe09fba20514e0dce5744ef Mon Sep 17 00:00:00 2001 From: "Xavier BOL (xbo)" Date: Thu, 18 Feb 2021 10:22:51 +0100 Subject: [PATCH] [IMP] sale_timesheet: remove warning when allow_billable changes Before this commit, when the user unchecks the allow_billable, we display a warning to alert him the impact of this changes. This commit removes this warning because we don't need it now, the user knows the impacts of this changes. task-2442683 --- addons/sale_timesheet/models/project.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/addons/sale_timesheet/models/project.py b/addons/sale_timesheet/models/project.py index aeb76806c85..848fc71d352 100644 --- a/addons/sale_timesheet/models/project.py +++ b/addons/sale_timesheet/models/project.py @@ -148,15 +148,6 @@ class Project(models.Model): if project.sale_line_id.is_expense: raise ValidationError(_("A billable project should be linked to a Sales Order Item that does not come from an expense or a vendor bill.")) - @api.onchange('allow_billable') - def _onchange_allow_billable(self): - if self.task_ids._get_timesheet() and self.allow_timesheets and not self.allow_billable: - message = _("All timesheet hours that are not yet invoiced will be removed from Sales Order on save. Discard to avoid the change.") - return {'warning': { - 'title': _("Warning"), - 'message': message - }} - def write(self, values): res = super(Project, self).write(values) if 'allow_billable' in values and not values.get('allow_billable'):