-
-
Notifications
You must be signed in to change notification settings - Fork 692
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] account_invoice_refund_link: Make more reliable the linking #1526
[16.0][IMP] account_invoice_refund_link: Make more reliable the linking #1526
Conversation
9959c57
to
289f17e
Compare
Hooking on a high level method like `_reverse_moves` (although still being private), makes that other modules hooking into it may alter the number of returned lines (like for example, account_invoice_refund_line_selection). We choose the low-level `copy_data` method that is used in such method for linking the refund lines with their origin ones, avoiding the problem.
289f17e
to
ea47cf4
Compare
@pedrocasi @ljsalvatierra-factorlibre here I refactor the linking code, and I see no reason for excluding of the link of other lines like sections, notes, and so on. Do you see any problem? |
Hi, A can't think of any inconvenient of linking also the sections and notes. Except for the fact that it's probably useless but we can live with that. |
OK, I don't think it's totally useless, as this still keeps trace that a section in the origin invoice generates a section in the refund, on contrary of a manually created section. Let's keep this way and see if there's any cons: /ocabot merge patch |
On my way to merge this fine PR! |
Congratulations, your PR was merged at 4ee90b3. Thanks a lot for contributing to OCA. ❤️ |
Forward-port of #1523
Hooking on a high level method like
_reverse_moves
(although still being private), makes that other modules hooking into it may alter the number of returned lines (like for example, account_invoice_refund_line_selection).We choose the low-level
copy_data
method that is used in such method for linking the refund lines with their origin ones, avoiding the problem.@Tecnativa