From df802f9005692e3d8d67b24fe149745553eb04b4 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Thu, 25 Aug 2016 15:11:01 +0200 Subject: [PATCH] [FIX] portal_sale: Move portal access rights to website_portal_sale Currently as no portal backend view exists anymore, the method 'get_access_action' will return a url to the backend. For example, if you have only sale installed (with portal_sale in auto install mode), you'll get access rights to sales orders in read mode in backend. The correct way to handle this is to return an access error and give the access rights to these documents only in website_portal_sale is installed, i.e. when the portal view is accessible in frontend under my/orders/ controller. --- addons/portal_sale/__openerp__.py | 1 - addons/website_portal_sale/__openerp__.py | 1 + .../security/ir.model.access.csv | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename addons/{portal_sale => website_portal_sale}/security/ir.model.access.csv (100%) diff --git a/addons/portal_sale/__openerp__.py b/addons/portal_sale/__openerp__.py index 828a41cb232..1095b637c22 100644 --- a/addons/portal_sale/__openerp__.py +++ b/addons/portal_sale/__openerp__.py @@ -28,7 +28,6 @@ by default, you simply need to configure a Paypal account in the Accounting/Invo 'depends': ['sale', 'portal', 'payment'], 'data': [ 'security/portal_sale_security.xml', - 'security/ir.model.access.csv', 'views/sale_order_views.xml', ], 'auto_install': True, diff --git a/addons/website_portal_sale/__openerp__.py b/addons/website_portal_sale/__openerp__.py index efd132e5bc8..673d1601858 100644 --- a/addons/website_portal_sale/__openerp__.py +++ b/addons/website_portal_sale/__openerp__.py @@ -13,6 +13,7 @@ Add your sales document in the frontend portal. Your customers will be able to c ], 'data': [ 'views/templates.xml', + 'security/ir.model.access.csv', ], 'demo': [ 'data/demo.xml' diff --git a/addons/portal_sale/security/ir.model.access.csv b/addons/website_portal_sale/security/ir.model.access.csv similarity index 100% rename from addons/portal_sale/security/ir.model.access.csv rename to addons/website_portal_sale/security/ir.model.access.csv