From 4305d05f79b96134aa58e024a1d181f3c8af4cca Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Thu, 30 Jan 2020 12:48:45 +0000 Subject: [PATCH] [FIX] sale_timesheet_purchase: show only Vendor Bills in smart button Under Projects, click on Overview, click on the smart button "Vendor Bills". The list will display account moves based only on the analytic account and not the actual type of the move opw-2180598 closes odoo/odoo#44330 X-original-commit: 5a476fb4f5d335d5460943603269f48e7ec3e026 Signed-off-by: Nicolas Martinelli (nim) --- addons/sale_timesheet_purchase/models/project_overview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_timesheet_purchase/models/project_overview.py b/addons/sale_timesheet_purchase/models/project_overview.py index 46c9524def2..07bc171f4d6 100644 --- a/addons/sale_timesheet_purchase/models/project_overview.py +++ b/addons/sale_timesheet_purchase/models/project_overview.py @@ -22,7 +22,7 @@ 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)]) + account_invoice_lines = self.env['account.move.line'].search([('analytic_account_id', 'in', accounts), ('move_id.type', 'in', ['in_invoice', 'in_refund'])]) account_invoices = account_invoice_lines.mapped('move_id') if account_invoices: stat_buttons.append({