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 ref sale triple discount with cherry pick #3615

Conversation

legalsylvain
Copy link
Contributor

Do not review, just for CI test.

grindtildeath and others added 7 commits March 6, 2025 22:42
Until now, the triple discount feature did use the standard Odoo field
as the first discount field, adding only extra fields for the second
and the third discount. This implied we had to override any function
using discount to consider the other discounts properly.

By adding an extra field discount1 to store the first discount, it allows
to redefine the standard discount field to a computed field that will
consolidate the triple discount from the other fields, and avoid the
need to redefine anything relying on the discount field as it will
already consider the triple discounts.
Fix computed fields dependencies

The issue with actual implementation is that discount is already
a computed field in std Odoo (eg to apply discount from pricelist).

Therefore, the value computed by Odoo must be stored in another field,
(ie discount1) for discount to be used to consolidate the multiple
discount. For this, we assign _compute_discount as the compute
of discount1 and redefine a new function to compute discount as
consolidated from the other discount fields.

Manually bump major version to play upgrade script

Fix migration script import

Fix init discount from pricelist
…ibles and can not work together by design.

similar to account_invoice_fixed_discount and account_invoice_triple_discount
@OCA-git-bot
Copy link
Contributor

Hi @AshishHirapara,
some modules you are maintaining are being modified, check this out!

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.

4 participants