Skip to content

[16.0][MIG] website_sale_cart_selectable#977

Open
carmenbianca wants to merge 27 commits intoOCA:16.0from
coopiteasy:16.0-mig-website_sale_cart_selectable
Open

[16.0][MIG] website_sale_cart_selectable#977
carmenbianca wants to merge 27 commits intoOCA:16.0from
coopiteasy:16.0-mig-website_sale_cart_selectable

Conversation

@carmenbianca
Copy link
Copy Markdown
Member

A fairly simple port of the module. I improved the documentation en passant.

Internal task: T12188

mikevhe18 and others added 25 commits October 22, 2024 11:49
[ADD] website_sale_cart_selectable

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Odoo upstream has changed its classes, and the selectors taken were very variable.
Use better ones.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Updated by Update PO files to match POT (msgmerge) hook in Weblate.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_cart_selectable
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_cart_selectable/es/
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_cart_selectable
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_cart_selectable/fr/
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Currently translated at 100.0% (2 of 2 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_cart_selectable
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_cart_selectable/ca/
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Copy link
Copy Markdown

@polchampion polchampion left a comment

Choose a reason for hiding this comment

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

successful functional test on the runboat

Copy link
Copy Markdown

@polchampion polchampion left a comment

Choose a reason for hiding this comment

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

functionaly tested on the runboat ; seems to work except there is an annoying error:


Uncaught Javascript Error > browser.navigator.clipboard is undefined

TypeError: browser.navigator.clipboard is undefined
    onClickClipboard@http://oca-e-commerce-16-0-pr977-d29370f00394.runboat.odoo-community.org/web/assets/604-1389ae2/1/web.assets_frontend_lazy.min.js:6767:20
    mainEventHandler@http://oca-e-commerce-16-0-pr977-d29370f00394.runboat.odoo-community.org/web/assets/604-1389ae2/1/web.assets_frontend_lazy.min.js:2074:77
    listener@http://oca-e-commerce-16-0-pr977-d29370f00394.runboat.odoo-community.org/web/assets/604-1389ae2/1/web.assets_frontend_lazy.min.js:1233:15
    ```

@huguesdk huguesdk force-pushed the 16.0-mig-website_sale_cart_selectable branch from 73b9bec to d29370f Compare February 6, 2025 16:16
@huguesdk
Copy link
Copy Markdown
Member

huguesdk commented Feb 6, 2025

@polchampion i could not reproduce the error you mentioned, but i discovered another error that happens when the website_sale_stock module is installed along with this module. i fixed it. how to reproduce the other error?

@huguesdk huguesdk mentioned this pull request Feb 7, 2025
33 tasks
@polchampion
Copy link
Copy Markdown

polchampion commented Feb 25, 2025

[edited - wrong pr]

Copy link
Copy Markdown

@polchampion polchampion left a comment

Choose a reason for hiding this comment

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

LGTM, couldn't reproduce the error

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 29, 2025
@huguesdk
Copy link
Copy Markdown
Member

@OCA/e-commerce-maintainers would someone please merge this?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 6, 2025
Copy link
Copy Markdown

@Honeyxilia Honeyxilia left a comment

Choose a reason for hiding this comment

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

LGTM (code review + tested on local instance)

@polchampion
Copy link
Copy Markdown

@OCA/e-commerce-maintainers would someone please merge this?

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 22, 2026
@huguesdk
Copy link
Copy Markdown
Member

@OCA/e-commerce-maintainers would someone please merge this?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 1, 2026
Copy link
Copy Markdown

@marcos-mendez marcos-mendez left a comment

Choose a reason for hiding this comment

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

Automated Review -- Tests Failed

1. Root Cause

The test failure is due to a database connection error (Connection to the database failed) during the Odoo server startup. This indicates that the test environment is misconfigured or the database is not accessible, not due to issues in the PR code itself.

2. Suggested Fix

There is no code fix required for the test failure, as it's a test environment issue, not a code issue. However, to ensure future tests run correctly, verify that:

  • The database URL is correctly configured in the test environment.
  • The PostgreSQL service is running and accessible.
  • The odoo user has proper permissions to access the database.

3. Additional Code Issues

No real bugs found in the code changes. The module follows OCA patterns correctly:

  • The website_btn_addtocart_published field is added to product.template as intended.
  • The field is a boolean with default=True, which is standard.
  • No override of extensibility hooks or incorrect use of modifiers.
  • No use of deprecated patterns.

4. Test Improvements

To better test this module, consider adding the following test cases in a TransactionCase or SavepointCase:

a. Test Field Visibility in Product View

  • Test: When website_btn_addtocart_published is set to False, the "Add to Cart" button should be hidden on the website.
  • Pattern: Use self.env['product.template'].create(...) and assert view rendering or button visibility via JS or DOM inspection.

b. Test Default Value

  • Test: Newly created product templates should have website_btn_addtocart_published=True by default.
  • Pattern: Create a new product template and assert the default value.

c. Test Inheritance and Data Migration

  • Test: Ensure the field is correctly inherited and accessible in both product.template and product.product.
  • Pattern: Use self.env['product.product'] to check if the field is present and functional.

d. Test UI Toggle Behavior

  • Test: The UI toggle should correctly update the field value.
  • Pattern: Use self.env['product.template'].browse(...).write({'website_btn_addtocart_published': False}) and assert the change.

These tests should be tagged with @tag('post_install', 'manual') or @tag('website_sale') to align with OCA testing practices.


⚠️ PR Aging Alert: CRITICAL

This PR by @carmenbianca has been waiting for 509 days — that is over 16 months without being merged or closed.

Every ignored PR is a contributor who might not come back. Review time matters. (OCA Aging Report)


Reciprocal Review Request

Hi everyone! I found some test failures on this PR and left detailed feedback above. I am happy to discuss or help debug. In the meantime, if any of you get a chance, I would appreciate a look at my open PR(s):

My open PRs across OCA:

Reviewing each other's work helps the whole community move forward. Thank you!


Environment via OCA Neural Reviewer: Minikube + K8s Job + oca-ci/py3.10-odoo16.0 | Odoo 16.0
Automated review by OCA Neural Reviewer + qwen3-coder:30b

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.