Skip to content

11.0 website multi theme port from 10 - #450

Merged
yajo merged 18 commits into
OCA:11.0from
yelizariev:11.0-website_multi_theme-port-from-10
May 23, 2018
Merged

yajo merged 18 commits into
OCA:11.0from
yelizariev:11.0-website_multi_theme-port-from-10

Conversation

@yelizariev

@yelizariev yelizariev commented Apr 23, 2018

Copy link
Copy Markdown
Member

WIP
We will check it internally first.

Ivan Yelizariev and others added 8 commits April 24, 2018 02:35
* [FIX] point inherit to copied views

Otherwise theme_customize doesn't work when we have chain of views like in
theme_clean:

theme_clean.option_bg_shade_light2 inherits theme_clean.less
theme_clean.less inherits website.assets_frontend

without this update, website_multi_theme copies
theme_clean.option_bg_shade_light2 but keeps inherit_id the same (i.e. to
theme_clean.less, which is not used, because it has a copy)

* [LINT] remove unused arguments, add semicolon
Current implementation disabled all backend views from a theme addon when converting it to multiwebsite mode.

This is now fixed, and includes a migration script to make things work again if you hit this situation in your database.
New field "auto" in "website.theme.asset" to distinguish assets
created from theme and ones created in xml. It's needed, for example,
for non-module themes (like Demo theme) be handled in _convert_assets
(before this update such themes were skipped)

[REF] field multi_theme_generated is replaced with origin_view_id

[IMP] apply default theme after installation

[IMP] reload themes on installing new modules with customize_show

[CI] Website always have Multi-Theme now. Also, increase default
timeout (10 sec) to 60 sec, because it may take more time now
on installing module with customize_show Reload is done automatically
@emagdalenaC2i

Copy link
Copy Markdown
Contributor

Is not migrated already? Check #398

@pedrobaeza

Copy link
Copy Markdown
Member

This is a recent improvement.

@Railia Railia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@yelizariev

Copy link
Copy Markdown
Member Author

@emagdalenaC2i #398 was made by me 😉

@yelizariev

Copy link
Copy Markdown
Member Author

I'll add more updates from 10.0 after #453 and #452

Ivan Yelizariev added 5 commits May 1, 2018 19:34
closes OCA#410

[CI] test coverage for duplicated snippets
which avoids recursive reloading
* new name for res.config
* move snippets lower, because website's tour use 4th element
@rafaelbn rafaelbn added this to the 11.0 milestone May 2, 2018
@yelizariev

yelizariev commented May 3, 2018

Copy link
Copy Markdown
Member Author

New updates to be merged here: #457 #456

@yelizariev

Copy link
Copy Markdown
Member Author

This error is randomly shown on travis checks

ssertionError: ("TypeError: undefined is not an object (evaluating 'manipulatorOffset.top')\n"
' at '
'http://127.0.0.1:8069/web/content/512-6922043/web_editor.assets_editor.js:132 '
'(in cover)\n'
' at '
'http://127.0.0.1:8069/web/content/512-6922043/web_editor.assets_editor.js:133 '
'(in toggleFocus)\n'
' at '
'http://127.0.0.1:8069/web/content/512-6922043/web_editor.assets_editor.js:162\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:802\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:796 '
'(in fire)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:797 '
'(in add)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:802\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:625 '
'(in each)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:802\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:803 '
'(in Deferred)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:802 '
'(in then)\n'
' at '
'http://127.0.0.1:8069/web/content/512-6922043/web_editor.assets_editor.js:162 '
'(in _activateSnippet)\n'
' at '
'http://127.0.0.1:8069/web/content/512-6922043/web_editor.assets_editor.js:150\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:892 '
'(in dispatch)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:865 '
'(in handle)\n'
' at :0 (in dispatchEvent)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:4187 '
'(in trigger_mouse_event)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:4187 '
'(in _click)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:4187 '
'(in _text)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:4186 '
'(in text)\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:4204\n'
' at :0\n'
' at http://127.0.0.1:8069/web/content/509-3597dce/web.assets_common.js:44\n'
'(leaf frame on top)')

@yelizariev

Copy link
Copy Markdown
Member Author

I'd like to set status "Needs review" to this issue and postpone with #456 which is not merged yet

@yelizariev

Copy link
Copy Markdown
Member Author

now #456 is in this PR too, i.e. all updates from 10.0 are here

Also, change 127.0.0.1 to 0.0.0.0 because latter is used in odoo for second demo
website
@yelizariev

Copy link
Copy Markdown
Member Author

Checked internally and found misunderstanding about Multi-footer. I've added a note to documentation in latest commit

@ilmir-k ilmir-k left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tested 👍
looks good to me

@yajo yajo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@yelizariev Is this ready to merge then?

@yelizariev

Copy link
Copy Markdown
Member Author

@yajo yes, it's ready. We did all we can. We will continue to test it with website_multi_company module once this PR is merged

@pedrobaeza

Copy link
Copy Markdown
Member

Please squash a bit some unneeded commits and I'll merge. Thanks for the work checking these rough edges.

@yelizariev

Copy link
Copy Markdown
Member Author

I found and done another thing that was in discussion #409 (comment)

@yelizariev

Copy link
Copy Markdown
Member Author

@pedrobaeza most commits were cherry-picked. I think it's better to keep them to easy comparing with 10.0 branch.

@yajo yajo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code & functional review

<odoo>

<record model="ir.module.category" id="base.module_category_theme">
<field name="exclusive" eval="False"/>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't believe it was so simple! Could you backport this to v10? 🤔 Or was it hardcoded in v10?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, it's hardcoded and the only way is rewrite (not inherit) one method

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants