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

[16.0][IMP] base_global_discount: Add check global discount in product #221

Merged
merged 1 commit into from
May 23, 2024

Conversation

Rferri44-S73
Copy link

Add check global discount in products

Copy link

@QuocDuong1306 QuocDuong1306 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@cyrilmanuel cyrilmanuel left a comment

Choose a reason for hiding this comment

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

LGTM

@rafaelbn
Copy link
Member

rafaelbn commented Sep 1, 2023

Hello! :-)

This module is base_global_discount and not base_config_discount

This should be reviewed by @ferran-S73 @rousseldenis or @pedrobaeza

Thank you!

@ferran-S73
Copy link

Hi @rafaelbn since the original owner of the PR doesn't work here anymore I fixed the commit name myself. As for the changes in here LGTM

@ferran-S73
Copy link

I guess the title of the PR has to be changed by a maintainer

@simahawk simahawk changed the title [16.0][IMP] base_config_discount: Add check global discount in product [16.0][IMP] base_global_discount: Add check global discount in product Oct 9, 2023
Copy link

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

LG overall, just a quick code review tho.

TODO:

  1. rollback module version
  2. remove odoo version from commit

@pedrobaeza anyone from Tecnativa to review?

base_global_discount/__manifest__.py Outdated Show resolved Hide resolved
@pedrobaeza pedrobaeza added this to the 16.0 milestone Oct 9, 2023
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I think in a business perspective more logical to use a negative flag: don't apply global discount, although the formula I prefer is to add a m2m in each global discount to exclude some products from them.

base_global_discount/models/product_product.py Outdated Show resolved Hide resolved
@ferran-S73
Copy link

@simahawk @pedrobaeza changes done, I haven't changed the field itself as to no disrupt our clients that are already using this feature

@pedrobaeza
Copy link
Member

Well, you can put migration scripts, but keeping weird fields in the definitive version is not desirable.

@simahawk
Copy link

Well, you can put migration scripts, but keeping weird fields in the definitive version is not desirable.

I agree. In this case you are allowed to change the version manually and add a pre/post migrate script to adapt existing installations.

@simahawk
Copy link

@Rferri44-S73 ping

@ferran-S73
Copy link

@Rferri44-S73 ping

Hi @simahawk , I'm sorry I haven't been able to update this pr as requested. I have this in my todo list and will eventually apply the suggestions you and @pedrobaeza gave me. Sorry for the inconvenience

Copy link

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 Mar 17, 2024
@cyrilmanuel
Copy link

cyrilmanuel commented Mar 26, 2024

Hi @Rferri44-S73 little ping have you the time to work on it ? :)

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 31, 2024
@carolinafernandez-tecnativa

Hi, could you please rebase? Thanks!

@dreispt
Copy link
Member

dreispt commented May 11, 2024

This is blocking OCA/account-invoicing#1338
What can be done to move forward?

Copy link

Choose a reason for hiding this comment

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

LGTM, Thanks!

@carolinafernandez-tecnativa

@simahawk can we proceed to merge? this blocks OCA/account-invoicing#1338

@@ -0,0 +1,15 @@
# Copyright 2023 Studio73 - Rafa Ferri <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
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
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

@@ -0,0 +1,36 @@
# Copyright 2023 Studio73 - Rafa Ferri <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
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
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

@pedrobaeza
Copy link
Member

Summarizing this one, apart from my latest comments, we are talking about not putting a flag in the product, that is very disrupting, but add a m2m in the global discounts for including or excluding. That way, you get even more granularity.

@ferran-S73 ferran-S73 force-pushed the 16.0-add-base_config_discount branch from dd45bc7 to d160ff9 Compare May 20, 2024 15:28
@ferran-S73
Copy link

ferran-S73 commented May 20, 2024

Hi @pedrobaeza I've updated this PR adding a negative flag on the products as accorded on OCA/account-invoicing#1725 (comment)

I have also updated th following PRs that depend on this one

Hope everything is alright now!

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

OK, I think it's good enough

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-221-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit aac7ffc into OCA:16.0 May 23, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

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

@ferran-S73 ferran-S73 deleted the 16.0-add-base_config_discount branch May 24, 2024 06:14
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.

10 participants