From 3c2876f68971eb8a5e5aa490586dc4305f9e6e3b Mon Sep 17 00:00:00 2001 From: Toufik Benjaa Date: Thu, 22 Mar 2018 11:51:55 +0100 Subject: [PATCH] [FIX] website_quote: Fix '/my/orders' route inheritance - The module 'website_quote' inherit the CustomerPortal class defined in 'portal/controllers/portal.py'. It does this to override a single method, namely 'portal_order_page'. The issue here is that 'portal_order_page' is not defined in the module portal, but in sale. This causes random issues where the inheritance was not done in the correct order. Which means the original portal_order_page was sometimes called before its child. Calling the original portal_order_page first means the child is never called. This commit change the imported CustomerPortal class to the one defined in the module sale. --- addons/website_quote/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index 2e803e788bf..841d9fb4743 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -5,7 +5,8 @@ import werkzeug from odoo import exceptions, fields, http, _ from odoo.http import request -from odoo.addons.portal.controllers.portal import CustomerPortal, get_records_pager +from odoo.addons.portal.controllers.portal import get_records_pager +from odoo.addons.sale.controllers.portal import CustomerPortal from odoo.addons.portal.controllers.mail import _message_post_helper