[MIG] 11.0 website multi theme - #398
Conversation
* [ADD][website_multi_theme] Allow different themes by website This a somewhat hacky addon that adds support for setting a different theme by website. Always updates views arch in development and demo instances. This allows faster development, while keeping stability and no surprises in production. * fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! fixup! fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! fixup! fixup! fixup! fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * [FIX][website_legal_page] Correctly raise a 404 error instead of a 500 if a view is not found * fixup! fixup! fixup! fixup! fixup! fixup! fixup! [ADD][website_multi_theme] Allow different themes by website * fixup! [FIX][website_legal_page] Correctly raise a 404 error instead of a 500 if a view is not found * squash! fixup! [FIX][website_legal_page] Correctly raise a 404 error instead of a 500 if a view is not found Fix tests that were getting warnings logged and random timeouts.
It's "monglia", not "mongolia". Closes OCA#378
|
Could you please fix travis before continuing further reviews? Thanks! |
|
Travis is green now |
yajo
left a comment
There was a problem hiding this comment.
Code looks OK, although I didn't do manual tests.
|
|
||
| - https://github.com/odoo/odoo/commit/15bf41270d3abb607e7b623b59355594cad170cf | ||
| - https://github.com/odoo/odoo/commit/7c6714d7fee4125f037ef194f9cff5235a6c5320 | ||
| - https://github.com/odoo/odoo/commit/48fe0a595308722a26afd5361432f24c610b4ba0 |
There was a problem hiding this comment.
You can remove this now that v11 includes all of that.
|
I will do manual tests by the end of this week |
yajo
left a comment
There was a problem hiding this comment.
Yikes, can't get the runbot to work... 😞 Did you do your manual tests? Code looks OK, although I'm a little worried about not manual testing because the relationship between a web page and a ir.ui.view has changed in v11
Not blocking just because of doubts
|
Runbot should be fixed now FYI. I'll be reviewing this one soon as well, thank you for the contribution @yelizariev! |
|
Not sure was @yajo's comment about runbot itself or about the module, but with latest module updates it should be much easier to try it on runbot -- I've updated demo data and added an instruction to the README file -- just one step is required to finish demo configuration. |
| <field name="page_id" ref="demo_page" /> | ||
| </record> | ||
|
|
||
| <record id="menu_demo_page2" model="website.menu"> |
There was a problem hiding this comment.
Aren't you able to create these 2 menu records here instead of creating them at the top and re-editing them here at the bottom?
There was a problem hiding this comment.
I can't. Odoo source has the same approach. The reason in few computed fields that depends on each other. I will send details soon
There was a problem hiding this comment.
Well, I don't have the answer at the moment. When I did I got some problem and switched to a "splitting solution" and it began work. But now I tried to do it without splitting and it works too.
The splitting in odoo source may somehow related to splitting website.page and ir.ui.view creation for pages:
| response = self.url_open("http://127.0.0.1:%d" % PORT, timeout=30) | ||
| def test_0_0_0_0(self): | ||
| """Check 0.0.0.0 downloads its default assets.""" | ||
| response = self.url_open("http://0.0.0.0:%d" % PORT, timeout=30) |
There was a problem hiding this comment.
Wow, TIL that you can use 0.0.0.0 to call to localhost!
There was a problem hiding this comment.
@yelizariev what was your reason to change this? currently facing travis error on these tests in v10. both 127.0.0.1 and 0.0.0.0 are failing the tests. localhost is working just fine.
There was a problem hiding this comment.
It allows using exising website records. Before the update new website was created
ip = env["website"].create({
"name": "127.0.0.1",
"domain": "127.0.0.1",
"multi_theme_id": False,
})
lasley
left a comment
There was a problem hiding this comment.
Code + test, thanks @yelizariev
|
Shall I squash some of my commits? Is there any guidelines for it? |
|
Take a look at https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#git Just squash your migration-related commits in one, while keeping others' history. |
* update tests to new lib api (stuff related to response) * update res.config views new framework * doc: remove commits requirements, because odoo 11.0 has all needed updates * update demo pages according to new framework * ci: use 0.0.0.0 as it's used in built-in demo data * ci: create demo page completely in xml * doc: How to test on runbot
088d74c to
4bb8c4a
Compare
|
Commits are squashed. Original history is here: https://github.com/yelizariev/website/commits/11.0-website_multi_theme-before-squash |


I've fixed installation problems and didn't make further testing
cc @yajo