summaryrefslogtreecommitdiff
path: root/addons/website_slides/controllers
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-09-02 09:09:16 +0000
committerRomain Derie <rde@odoo.com>2019-10-02 07:13:26 +0000
commit9b38bcec1269f0e72606e774f5e1f5f4a78baa89 (patch)
treea87ff8144fb1a26e3d0887a4f886557775b8f4b5 /addons/website_slides/controllers
parentc8c8413e3e86e2abc51ade48f11320de961e5e50 (diff)
[IMP] website, website_*: improve edit in backend feature
*base, website_blog, website_event, website_forum, website_slides With this commit: 1. It is now possible to add the 'Edit in backend' entry in the frontend navbar for any desired model, not only the ones which have the published mixin. It will simply redirect to the main_object form view. This commit add it to Forum and Blog. 2. When clicking on 'Edit in backend', it is now possible to land on another module than Website. That's especially useful for events and slides which are not directly related to the website module as they have their own module. 3. Remove the custom Edit in backend from the forum homepage (fa-cog). Opportunity was also taken to remove the 'edit welcome message'. It will now be editable through the editor (welcome message will appear in edit mode). Thus we got rid of the custom edit welcome message controller and views. Closes #36325
Diffstat (limited to 'addons/website_slides/controllers')
-rw-r--r--addons/website_slides/controllers/main.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/website_slides/controllers/main.py b/addons/website_slides/controllers/main.py
index d0867a8b342..abf59a1ad97 100644
--- a/addons/website_slides/controllers/main.py
+++ b/addons/website_slides/controllers/main.py
@@ -96,6 +96,7 @@ class WebsiteSlides(WebsiteProfile):
values = {
# slide
'slide': slide,
+ 'main_object': slide,
'most_viewed_slides': most_viewed_slides,
'related_slides': related_slides,
'previous_slide': previous_slide,
@@ -394,6 +395,7 @@ class WebsiteSlides(WebsiteProfile):
values = {
'channel': channel,
+ 'main_object': channel,
'active_tab': kw.get('active_tab', 'home'),
# search
'search_category': category,