Skip to content

[11.0][ADD] website_multi#477

Closed
tarteo wants to merge 5 commits intoOCA:11.0from
tarteo:11_multi_website
Closed

[11.0][ADD] website_multi#477
tarteo wants to merge 5 commits intoOCA:11.0from
tarteo:11_multi_website

Conversation

@tarteo
Copy link
Member

@tarteo tarteo commented Jun 6, 2018

This module makes it easier to manage multiple websites in one database.

Features

  • Adds configuration menu for websites
  • Improves the list view of websites with extra fields
  • Easy switch between websites
  • Change the website of pages in the page properties dialog

The module still needs more features. For our customer the implemented features were adequate.

@pedrobaeza pedrobaeza added this to the 11.0 milestone Jun 6, 2018
parent="website.menu_website_global_configuration"
action="action_configure_multi_website"/>

<menuitem id="menu_configure_menu_website"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same id same action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this comment a little more, please?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, my eyes got tricked by multi/menu switch... nevermind! 😅

class Website(models.Model):
_inherit = 'website'

# Replaces the web.base.url system parameter

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example to use in generating the sitemap.xml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why replace? Shouldn't you reuse it instead or use it as a default?
Is it just for the switcher?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

location coming from window?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

fields: ['domain']
}).then(function (websites) {
_.each(websites, function(website) {
var url = location.port ? 'http://' + website.domain + ':' + location.port : 'http://' + website.domain;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why location info is used for each website?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it. I can use base_url here it must been a leftover before I had the field.

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@tarteo
Copy link
Member Author

tarteo commented Jun 14, 2018

@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?
We can later extend the multi website functionality by adding options for the footer (automatic / custom) etc to be website specific. In a live stream of Odoo I heard they are also working on multi website functionalities.

@yajo
Copy link
Member

yajo commented Jun 14, 2018

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.

We can later extend the multi website functionality by adding options for the footer (automatic / custom) etc to be website specific.

Right now, the website-specific views is, basically, the main feature for website_multi_theme. Just for you to know it. 😊

In a live stream of Odoo I heard they are also working on multi website functionalities.

True, but I wouldn't count on it for odoo 12.

Thanks!

@yelizariev
Copy link
Member

yelizariev commented Jun 14, 2018

website_multi_theme is useful even when you use the same theme for all websites. I.e. is not just "multi-theme" feature.

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?

I'd prefer to see all updates directly in website_multi_theme. I don't think that multi-website is complete without multi-theme (multi-view) features. While making them separate force us to test website_multi_theme separately on every update of suggested website_multi module.

@tarteo be aware of our multi-website modules to don't reinvent the same features
https://github.com/it-projects-llc/website-addons/tree/10.0/website_multi_company
https://github.com/it-projects-llc/website-addons/tree/10.0/website_multi_company_blog
https://github.com/it-projects-llc/website-addons/tree/10.0/website_multi_company_portal
https://github.com/it-projects-llc/website-addons/tree/10.0/website_multi_company_sale

@tarteo
Copy link
Member Author

tarteo commented Jun 14, 2018

@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:

  • Improve the list view of websites with extra fields (website_ids)
  • Easy switch between websites
  • Change the website of pages in the page properties dialog

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.

@tarteo
Copy link
Member Author

tarteo commented Jun 14, 2018

@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 👍

@tarteo
Copy link
Member Author

tarteo commented Jun 20, 2018

#488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants