From 93f17e9e3cb6506c150ef51d95c85577cb181fb1 Mon Sep 17 00:00:00 2001 From: anhe-odoo Date: Mon, 8 Nov 2021 06:58:42 +0000 Subject: [PATCH] [FIX] accouting: fix 'unpaid invoice' filter on main dashboard Expected Behaviour When clicking on the "XX Unpaid Invoices" link on the main dashboard of the accounting app, we should get to a list view with only unpaid (and partially paid) invoices Observed Behaviour When cliking on the link, we get all the invoices, even the paid ones. Reproducibility This bug can be reproduced following these steps : 1. Create some invoices 2. Make sure some of them are paid and some are not 3. Go to the main dashboard 4. Click on the "XX Unpaid Invoices" link in the "Customer Invoices" app Problem Root Cause The problem comes from a change in the filter name from V14 to V15 ("unpaid" category has been replaced by "open"). Related issues opw-2681099 closes odoo/odoo#79643 X-original-commit: 9212d07c5919470361b638f0e70c2069957c7d6f Related: odoo/enterprise#22221 Signed-off-by: Olivier Colson Signed-off-by: Hendrickx Anthony (anhe) --- addons/account/models/partner.py | 2 +- addons/account/views/account_journal_dashboard_view.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py index 92b54cc1b7d..2a3767d9563 100644 --- a/addons/account/models/partner.py +++ b/addons/account/models/partner.py @@ -517,7 +517,7 @@ class ResPartner(models.Model): ('move_type', 'in', ('out_invoice', 'out_refund')), ('partner_id', 'child_of', self.id), ] - action['context'] = {'default_move_type':'out_invoice', 'move_type':'out_invoice', 'journal_type': 'sale', 'search_default_unpaid': 1} + action['context'] = {'default_move_type':'out_invoice', 'move_type':'out_invoice', 'journal_type': 'sale', 'search_default_open': 1} return action def can_edit_vat(self): diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index 3326fc4ea09..1144688420a 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -327,12 +327,12 @@