From 51b70b6fc42a5b04a30e651cbcacb5593dc7bad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Baranx=20=28bar=29?= Date: Fri, 21 Feb 2020 10:40:34 +0000 Subject: [PATCH] [FIX] sale_timesheet_purchase: move_id.type has been renamed as move_id.move_type The 'type' field in the 'account.move' model has been recently renamed to 'move_type'. This bug fix consists in using the new field name in the search call. closes odoo/odoo#45935 Signed-off-by: Yannick Tivisse (yti) --- addons/sale_timesheet_purchase/models/project_overview.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/sale_timesheet_purchase/models/project_overview.py b/addons/sale_timesheet_purchase/models/project_overview.py index 07bc171f4d6..86484038b37 100644 --- a/addons/sale_timesheet_purchase/models/project_overview.py +++ b/addons/sale_timesheet_purchase/models/project_overview.py @@ -22,7 +22,9 @@ class Project(models.Model): context={'create': False, 'edit': False, 'delete': False} ) }) - account_invoice_lines = self.env['account.move.line'].search([('analytic_account_id', 'in', accounts), ('move_id.type', 'in', ['in_invoice', 'in_refund'])]) + account_invoice_lines = self.env['account.move.line'].search( + [('analytic_account_id', 'in', accounts), + ('move_id.move_type', 'in', ['in_invoice', 'in_refund'])]) account_invoices = account_invoice_lines.mapped('move_id') if account_invoices: stat_buttons.append({