diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-07-13 11:44:54 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-07-13 11:44:54 +0200 |
| commit | 87dadc5bc83714cb0e748824f57e4cd35d02bbbf (patch) | |
| tree | 49d9aaae948da7ce7dad6cf37d6a4e2d670f4c58 /addons | |
| parent | c952a117701f9ce3aeeca9f6f19f5288b85fbb32 (diff) | |
Revert "[FIX] hr_timesheet: Removing task on a timesheet line"
Method `_analytic_compute_delivered_quantity` does not exists anymore.
The bug this patch resolved is not present in saas~11.2. Patch not
needed.
This reverts commit 371a92fb3086fb4f972ca96ec4a79c2a539f428a.
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale_timesheet/models/account.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/sale_timesheet/models/account.py b/addons/sale_timesheet/models/account.py index ce6d789d690..23a5b3a5f67 100644 --- a/addons/sale_timesheet/models/account.py +++ b/addons/sale_timesheet/models/account.py @@ -32,16 +32,12 @@ class AccountAnalyticLine(models.Model): @api.multi def write(self, values): # prevent to update invoiced timesheets if one line is of type delivery - sale_order_lines = self.env['sale.order.line'] if self.sudo().filtered(lambda aal: aal.so_line.product_id.invoice_policy == "delivery") and self.filtered(lambda timesheet: timesheet.timesheet_invoice_id): if any([field_name in values for field_name in ['unit_amount', 'employee_id', 'task_id', 'timesheet_revenue', 'so_line', 'amount', 'date']]): raise UserError(_('You can not modify already invoiced timesheets (linked to a Sales order items invoiced on Time and material).')) - if 'task_id' in values and not values.get('so_line'): - sale_order_lines = self.sudo().mapped('so_line') result = super(AccountAnalyticLine, self).write(values) # applied only for timesheet self.filtered(lambda t: t.project_id)._timesheet_postprocess(values) - sale_order_lines.with_context(sale_analytic_force_recompute=True)._analytic_compute_delivered_quantity() return result @api.model |
