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

[14.0][FIX] account_invoice_triple_discount: recomputed taxes overwritten by old move line values #1537

Conversation

eantones
Copy link

We only need to save and restore the invoice lines, not all the move lines as is currently happening.

The restoration of the old lines is overwriting the changes made in the tax lines by the tax recomputation in line

res = super(AccountMove, self)._recompute_tax_lines(**kwargs)

This is a problem in a certain situations like in repair_discount module where the old values are kept due to this bug.
https://github.com/OCA/manufacture/blob/035a4de34a0de7e4f0db1a9c0ab3354acf235e99/repair_discount/models/mrp_repair.py#L115-L119

…y old move line values

We only need to save and restore the invoice lines, not all the move lines as is currently happening.

The restoration of the old lines is overwriting the changes made in the tax lines by the tax recomputation in line https://github.com/OCA/account-invoicing/blob/9b64ecc2b8e9b5146a12994b5c13f9a603b0db17/account_invoice_triple_discount/models/account_move.py#L30
@rafaelbn rafaelbn changed the title [FIX] account_invoice_triple_discount: recomputed taxes overwritten by old move line values [14][FIX] account_invoice_triple_discount: recomputed taxes overwritten by old move line values Aug 30, 2023
@rafaelbn rafaelbn added this to the 14.0 milestone Aug 30, 2023
@rafaelbn
Copy link
Member

If all of you, in this great OCA maka a cross review of the same module! I'm sure the force will be with us and you can fix all BUGs in all versions

@eantones @ao-landoo @Segui-S79 @odooNextev @ramiadavid

imagen

❤️ OCA ❤️

@eantones eantones changed the title [14][FIX] account_invoice_triple_discount: recomputed taxes overwritten by old move line values [14.0][FIX] account_invoice_triple_discount: recomputed taxes overwritten by old move line values Aug 30, 2023
@eantones
Copy link
Author

Fixed in #1605

@eantones eantones closed this Nov 27, 2023
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.

2 participants