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

[ADD] product_pricelist_alternative #1557

Merged

Conversation

santostelmo
Copy link
Contributor

@santostelmo santostelmo commented Mar 19, 2024

It allows you to define alternative price lists to a reference price list.
As a general rule, the price of a given product is obtained from the minimum between its reference price list and the alternative price lists.

However, if the product's reference price has been calculated on the basis of a price rule in which the "Alternative Pricelist Policy = Ignore" field is selected, the alternative price lists will not be taken into account.

@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from 8186681 to f99e03a Compare March 19, 2024 07:22
@santostelmo santostelmo marked this pull request as draft March 19, 2024 07:23
@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from f99e03a to 2b1bba5 Compare March 19, 2024 07:45
@santostelmo santostelmo marked this pull request as ready for review March 19, 2024 07:51
@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from 2b1bba5 to 01f4908 Compare March 19, 2024 07:52
@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch 2 times, most recently from a5b9633 to a4bb538 Compare March 19, 2024 09:14
@santostelmo
Copy link
Contributor Author

@simahawk I changed the code with some of your requests

@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from a4bb538 to e326f32 Compare March 19, 2024 10:10
@dreispt
Copy link
Member

dreispt commented Mar 22, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1557-by-dreispt-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Mar 22, 2024
Signed-off-by dreispt
@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). 🤖

@santostelmo santostelmo marked this pull request as draft March 25, 2024 07:21
@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch 2 times, most recently from b2966ec to 06b5623 Compare March 25, 2024 13:34
@santostelmo santostelmo marked this pull request as ready for review March 25, 2024 13:35
@cyrilmanuel
Copy link

Hi @pedrobaeza , can you merge this PR please ? :)

@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from 06b5623 to 3e05b91 Compare March 27, 2024 10:01
@santostelmo
Copy link
Contributor Author

@simahawk code was updated with read_group to count and new test

@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from 3e05b91 to 7a6745e Compare March 27, 2024 13:17
@santostelmo santostelmo force-pushed the 16.0-add-product_pricelist_alternative branch from 7a6745e to 5f0c72b Compare March 27, 2024 13:30
Copy link
Contributor

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

pre-approving

[("alternative_pricelist_ids", "in", self.ids)],
["alternative_pricelist_ids"],
"alternative_pricelist_ids",
lazy=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

why lazy=false?

You don't need to access anything but ID and count.

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

@dreispt
Copy link
Member

dreispt commented Mar 28, 2024

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-1557-by-dreispt-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2bf10f4 into OCA:16.0 Mar 28, 2024
9 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at fca14bc. 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.

6 participants