-
-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] website: Handle Bootstrap 3->4 and Less->Scss #1819
Conversation
Set as WIP please, I still have to test this. |
22072a7
to
4024d55
Compare
cfaa8d7
to
bf789ae
Compare
Ready to review. See OCA/openupgradelib#148 (comment). |
@yajo Please, rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bf789ae
to
84b5030
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All attended.
@mreficent @yajo I commented with @JKE-be in Spanish OCA days about the noupdate flag in several website views. They are amending this in odoo/odoo#33919, which is great, but we should modify now this code according this:
|
84b5030
to
6267e5a
Compare
All attended, except #1819 (comment), which I understand should be done separately. |
6267e5a
to
210a0a0
Compare
Done now. |
In case a user has customized any Less attachments, these are disabled because 99% of the times it will fail: Syntax from Scss and Less is different, there may not be a `lessc` executable in the Odoo 12 environment, and inherited views would probably fail finding the node to replace from XPath. Automated resilient conversion between Less and Scss is close to impossible. To avoid problems, these views are disabled. You are still able to fix and reenable them manually as needed. In Odoo v12, the standard behavior when a user modifies a website template is to create a modified copy which is specific to the current website (a.k.a. COW 🐮). To benefit from this new behavior, when migrating a website from Odoo 11 to 12: 1. If a website-specific view exists, it is migrated in place. 2. Website-agnostic views are migrated in a COW 🐮 view, specific for each preexisting website. 3. Webiste-agnostic views are marked as `noupdate=0`, so when starting a new website, you have the updated views as a starting point. To make this work, all this conversion had to be made in the pre-migration stage. 4. The new copies will have a hidden migration column that indicates from which view was it copied. 5. If the views were using any default images from snippets, they will be stored in the filestore now. To make this work, OCA/openupgradelib#148 is needed.
210a0a0
to
4f809ff
Compare
Less to Scss
In case a user has customized any Less attachments, these are disabled because 99% of the times it will fail: Syntax from Scss and Less is different, there may not be a
lessc
executable in the Odoo 12 environment, and inherited views would probably fail finding the node to replace from XPath.Automated resilient conversion between Less and Scss is close to impossible.
To avoid problems, these views are disabled. You are still able to fix and reenable them manually as needed.
Bootstrap 3 to 4, with new multiwebsite support
In Odoo v12, the standard behavior when a user modifies a website template is to create a modified copy which is specific to the current website (a.k.a. COW 🐮).
To benefit from this new behavior, when migrating a website from Odoo 11 to 12:
noupdate=0
, so when starting a new website, you have the updated views as a starting point. To make this work, all this conversion had to be made in the pre-migration stage.To make this work, OCA/openupgradelib#148 is needed.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
@Tecnativa