[11.0][ADD] website_multi#477
Conversation
| parent="website.menu_website_global_configuration" | ||
| action="action_configure_multi_website"/> | ||
|
|
||
| <menuitem id="menu_configure_menu_website" |
There was a problem hiding this comment.
Can you explain this comment a little more, please?
There was a problem hiding this comment.
ouch, my eyes got tricked by multi/menu switch... nevermind! 😅
website_multi/models/website.py
Outdated
| class Website(models.Model): | ||
| _inherit = 'website' | ||
|
|
||
| # Replaces the web.base.url system parameter |
There was a problem hiding this comment.
For example to use in generating the sitemap.xml
There was a problem hiding this comment.
but why replace? Shouldn't you reuse it instead or use it as a default?
Is it just for the switcher?
There was a problem hiding this comment.
For now the switcher only uses this field. But I have another module website_multi_blog (no PR yet) that uses this field to generate the RSS for multiple website properly. I can still use the web.base.url property as default in that module.
| var SwitchWebsiteMenu = WebsiteNavbarActionWidget.extend({ | ||
| start: function () { | ||
| var $current_website = this.$('.current-website'); | ||
| $current_website.html(location.hostname); |
| fields: ['domain'] | ||
| }).then(function (websites) { | ||
| _.each(websites, function(website) { | ||
| var url = location.port ? 'http://' + website.domain + ':' + location.port : 'http://' + website.domain; |
There was a problem hiding this comment.
why location info is used for each website?
There was a problem hiding this comment.
I'll change it. I can use base_url here it must been a leftover before I had the field.
yajo
left a comment
There was a problem hiding this comment.
I'm just wondering if this duplicates some features from https://www.odoo.com/apps/modules/11.0/website_multi_theme/ 🤔
Did you know about it?
|
@yajo Thanks for the reaction. Yes I know about the module and some are duplicate. If you want I can make some small changes to website_multi_theme in this PR e.g. the menu item 'Websites' is duplicate. website_multi_theme will then depend on this module. What do you think? |
OK, it would be nice. @yelizariev will be interested in this too.
Right now, the website-specific views is, basically, the main feature for
True, but I wouldn't count on it for odoo 12. Thanks! |
|
I'd prefer to see all updates directly in @tarteo be aware of our multi-website modules to don't reinvent the same features |
|
@yajo Thanks! didn't know the website_multi_theme module has such great features 😲 .@yelizariev What do you suggest? I can put the functionalities that I've added in this module into the website_multi_theme module that includes:
The improvements are mostly nice controls for the user. This module was implemented at a customer that wanted a website with multiple domains. You can see the result on www.ubports.com and www.ubuntu-touch.io. it's the same database using the same theme but with different content. |
|
@yelizariev I've also created a module website_multi_blog which takes care of the sitemap.xml and proper base_url. I can suggest this with a PR extending the module website_multi_company_blog. Thank you a lot for the references 👍 |
This module makes it easier to manage multiple websites in one database.
Features
The module still needs more features. For our customer the implemented features were adequate.