Skip to content
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

[17.0][MIG] website_sale_suggest_create_account #954

Merged

Conversation

cem-adhoc
Copy link
Contributor

No description provided.

ovnicraft and others added 30 commits July 12, 2024 12:16
Example of module which requires such refactoring:

https://github.com/it-projects-llc/website-addons/tree/10.0/website_sale_checkout_store

[FIX] condition to show normal checkout button was wrong in website_sale_suggest_create_account
I was equal to

(user_authenticated or not signup_allowed and can_checkout)

while it has to be

(user_authenticated or not signup_allowed) and can_checkout
Always show 'Process Checkout', not highlighted if user not logged in
Suggest to login or signup, according to 'invitation_scope', avoiding too many buttons in cart page
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_suggest_create_account
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_suggest_create_account/es/
Ensure that 'vat' is not empty for compatibility with website_sale_vat_required module
- Create setUpClass method
- Include context keys for avoiding mail operations overhead.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_suggest_create_account
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_suggest_create_account/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_suggest_create_account
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_suggest_create_account/
Currently translated at 100.0% (5 of 5 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_suggest_create_account
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_suggest_create_account/es/
…solve conflict between 'website_sale_suggest_create_account' and 'website_sale_checkout_skip_payment'

This commit addresses a conflict between the 'website_sale_suggest_create_account' and 'website_sale_checkout_skip_payment' modules. When 'website_sale_suggest_create_account' is installed, it modifies a section of the view by removing a class. Subsequently, upon installing the 'website_sale_checkout_skip_payment' module, it expects to find this class, resulting in an error due to the previous deletion. By adjusting the priority of the view, this commit ensures that the necessary class is retained during positioning, resolving the conflict.
Currently translated at 100.0% (5 of 5 strings)

Translation: e-commerce-16.0/e-commerce-16.0-website_sale_suggest_create_account
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-16-0/e-commerce-16-0-website_sale_suggest_create_account/it/
@cem-adhoc cem-adhoc force-pushed the 17.0-mig-website_sale_suggest_create_account branch from a90da91 to c786080 Compare July 18, 2024 18:47
@pedrobaeza pedrobaeza changed the title 17.0 mig website sale suggest create account [17.0][MIG] website_sale_suggest_create_account Jul 18, 2024
@pedrobaeza
Copy link
Member

/ocabot migration website_sale_suggest_create_account

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jul 18, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 18, 2024
27 tasks
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Code and functional review 👍

please review @pilarvargas-tecnativa

@@ -1,105 +1,63 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template
id="cart"
inherit_id="website_sale.cart"
id="navigation_buttons"
Copy link
Contributor

Choose a reason for hiding this comment

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

You should make a migration script for this change in the template id. It is not advisable to leave duplicate old views.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pilarvargas-tecnativa Do you have any example of a migration script for this? It would be helpful to see how these cases are handled specifically. Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

For example:

https://github.com/OCA/OpenUpgrade/blob/16.0/openupgrade_scripts/scripts/loyalty/16.0.1.0/pre-migration.py#L548-L564

But you must create the directory (migrations) and the migration files (pre or post) in the module itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pilarvargas-tecnativa done. can you review it?

@cem-adhoc cem-adhoc force-pushed the 17.0-mig-website_sale_suggest_create_account branch from c786080 to 5fb276a Compare July 25, 2024 17:14
@cem-adhoc cem-adhoc force-pushed the 17.0-mig-website_sale_suggest_create_account branch from 5fb276a to 731ebc5 Compare July 25, 2024 17:16
Copy link
Contributor

@pilarvargas-tecnativa pilarvargas-tecnativa left a comment

Choose a reason for hiding this comment

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

Good! thanks! :D

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-954-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 4f9187f into OCA:17.0 Jul 26, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 6227cfe. Thanks a lot for contributing to OCA. ❤️

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.