From 15b8f3586c00337d23c9328c5d825ccc9507289d Mon Sep 17 00:00:00 2001 From: Damien Bouvy Date: Mon, 7 Mar 2016 19:55:07 +0100 Subject: [PATCH] [FIX] website_portal_sale: let ACL do their job Specifying the partner_id in the search does not give the same result as the portal_sale module, which actually lists all the SOs/Quotes/Invoices where you or anyone from your company is the partner_id. To make the backend and frontend listings consistent, let the ACL and ir_rules do their job (these are defined in the portal_sale module). --- addons/website_portal_sale/controllers/main.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/website_portal_sale/controllers/main.py b/addons/website_portal_sale/controllers/main.py index e9f1c48ee99..79512a90c67 100644 --- a/addons/website_portal_sale/controllers/main.py +++ b/addons/website_portal_sale/controllers/main.py @@ -17,15 +17,12 @@ class website_account(website_account): res_sale_order = request.env['sale.order'] res_invoices = request.env['account.invoice'] quotations = res_sale_order.search([ - ('partner_id.id', '=', partner.id), ('state', 'in', ['sent', 'cancel']) ]) orders = res_sale_order.search([ - ('partner_id.id', '=', partner.id), ('state', 'in', ['sale', 'done']) ]) invoices = res_invoices.search([ - ('partner_id.id', '=', partner.id), ('state', 'in', ['open', 'paid', 'cancelled']) ])