From fd06fd15551e4a4ac5765f573332ce08dacd45aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 16 May 2018 09:22:13 +0200 Subject: [PATCH] [FIX] emc_wsite_portal: Show followed invoices The issue was that the portal shows all the release capital request that are followed by the user (generally because, it's him that that accepted the request). The page should only show the capital request of that the user owns. --- easy_my_coop_website_portal/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easy_my_coop_website_portal/controllers/main.py b/easy_my_coop_website_portal/controllers/main.py index 54a0833..6517955 100644 --- a/easy_my_coop_website_portal/controllers/main.py +++ b/easy_my_coop_website_portal/controllers/main.py @@ -42,7 +42,7 @@ class CooperatorWebsiteAccount(WebsiteAccount): invoice_mgr = request.env['account.invoice'] capital_request_count = invoice_mgr.search_count([ - ('message_partner_ids', 'in', + ('partner_id', 'in', [partner.commercial_partner_id.id]), ('state', 'in', ['open', 'paid', 'cancelled']), # Get only the release capital request @@ -69,7 +69,7 @@ class CooperatorWebsiteAccount(WebsiteAccount): invoice_mgr = request.env['account.invoice'] domain = [ - ('message_partner_ids', 'in', + ('partner_id', 'in', [partner.commercial_partner_id.id]), ('state', 'in', ['open', 'paid', 'cancelled']), # Get only the release capital request