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

[15.0][ADD] website_sale_product_publish_date #765

Open
wants to merge 1 commit into
base: 15.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link

@AungKoKoLin1997 AungKoKoLin1997 commented Mar 3, 2023

The purpose of this module is to publish and unpublish products in ecommerce with timeframe.
@qrtl

@pedrobaeza
Copy link
Member

Why not modifying the controller to add a condition to the product search the same as website_blog does?

The publish date can be by website, but that's something for the roadmap I think.

Finally, I think it can be called website_sale_product_publish_date.

@pedrobaeza pedrobaeza added this to the 15.0 milestone Mar 3, 2023
@AungKoKoLin1997
Copy link
Author

Why not modifying the controller to add a condition to the product search the same as website_blog does?

@pedrobaeza I don't get your point. What part of controller are your mentioning in website_blog?

@AungKoKoLin1997
Copy link
Author

The purpose of this module is to publish/publish the product with scheduler, not for reflecting actual publish_date via website or manual. For the product search, this module will not hide any product.(For instance, products may not have expected_publish_date but user can manually publish and will show in e-commerce. They only care about website_publish.). The module intends for the uses who want to publish some products that have a specific time to be published. So, they don't need to be updated manually even if it is late at night.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from aa8f0af to e2f66a9 Compare August 24, 2023 02:42
Copy link

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

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

Functional review

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from e2f66a9 to 8c771bd Compare February 1, 2024 03:09
Copy link

github-actions bot commented Jun 2, 2024

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 2, 2024
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch 3 times, most recently from 20edab8 to ad4069c Compare June 26, 2024 10:14
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

@AungKoKoLin1997 As we just talked, can you please look into the possibility of extending website._search_exact() instead of using cron?

https://github.com/odoo/odoo/blob/a923bc42b5d1c856e02215e05cfcea47a9685f48/addons/website/models/website.py#L1608-L1633

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from ad4069c to 369d74d Compare June 27, 2024 07:20
@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] website_sale_product_publish_cron [15.0][ADD] website_sale_product_publish Jun 27, 2024
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from 369d74d to 0e29ad5 Compare June 27, 2024 10:08
@AungKoKoLin1997 AungKoKoLin1997 changed the title [15.0][ADD] website_sale_product_publish [15.0][ADD] website_sale_product_publish_date Jun 27, 2024
Comment on lines 34 to 35
publish_domain = self._get_publish_date_domain()
combined_domain = expression.AND([base_domain, publish_domain])
Copy link
Member

Choose a reason for hiding this comment

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

We should do this only on the product model.

It may also be safer to check website_published is included in domain_list.

@AungKoKoLin1997
Copy link
Author

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jun 30, 2024
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Code review.

Comment on lines 34 to 35
publish_domain = self._get_publish_date_domain()
combined_domain = expression.AND([base_domain, publish_domain])
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
publish_domain = self._get_publish_date_domain()
combined_domain = expression.AND([base_domain, publish_domain])
publish_date_domain = self._get_publish_date_domain()
combined_domain = expression.AND([base_domain, publish_date_domain])

@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). 🤖

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from 0e29ad5 to c99a8a9 Compare July 1, 2024 15:10
Copy link
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

@AungKoKoLin1997 Can you please fix the commit message reflecting the module name.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from c99a8a9 to 5371b54 Compare July 2, 2024 01:40
@AungKoKoLin1997 AungKoKoLin1997 requested a review from kanda999 July 9, 2024 09:57
Copy link

@kanda999 kanda999 left a comment

Choose a reason for hiding this comment

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

Functional review

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 15.0-add-website_sale_product_publish_cron branch from 5371b54 to 60cd342 Compare August 29, 2024 07:55
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.

5 participants