-
-
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][MIG] account_invoice_refund_link #1264
[16.0][MIG] account_invoice_refund_link #1264
Conversation
Hey @ljsalvatierra-factorlibre, thank you for your Pull Request. It looks like some users haven't signed our Contributor License Agreement, yet.
Appreciation of efforts, |
ed2f77d
to
350aef8
Compare
350aef8
to
3610b9b
Compare
@OCA/community-maintainers |
/ocabot migration account_invoice_refund_link |
/ocabot rebase |
@rafaelbn The rebase process failed, because command
|
Enhancements: * Reverse link from invoice to refunds also available. * Link at invoice line level, not only at invoice level. * When installing the module after some refunds have been made, the module tries to find the link to the original invoice for them. * OCA Guidelines compliance. * Compatibility in OpenUpgrade for migrating from 8.0 module account_refund_original. * Tests with 100% coverage. Technical changes: * Rename field origin_invoices_ids to origin_invoice_ids * Rename field refund_invoices_description to refund_reason * Rename addon to account_invoice_refund_link
Odoo already includes a method for preparing the refund, so using it we don't have to make any guess about the returned domain and the method also serves for refunds created directly by code. Initial line match has also been improved comparing product or description.
* [FIX] account_invoice_refund_link: Don't copy m2m fields Many2many fields have copy=True property by default, having an incorrect duplication of origin or refund invoices. Steps to reproduce: * Create an invoice * Refund it * Duplicate the original invoice * The refund will be link to 2 original invoices Included tests covering the use cases for avoiding future regressions.
Since v11, Odoo counts with a field called `refund_invoice_ids` of type one2many, which conflicts with the m2m field defined in this module. Moreover, these fields are not needed anymore. There is only 2 OCA modules using this module right now, and they don't need significant changes for this adaptation, but I will do it when this get merged.
Currently translated at 100.0% (17 of 17 strings) Translation: account-invoicing-12.0/account-invoicing-12.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-12-0/account-invoicing-12-0-account_invoice_refund_link/de/
Currently translated at 100.0% (17 of 17 strings) Translation: account-invoicing-12.0/account-invoicing-12.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-12-0/account-invoicing-12-0-account_invoice_refund_link/pt_BR/
Currently translated at 100.0% (11 of 11 strings) Translation: account-invoicing-13.0/account-invoicing-13.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-13-0/account-invoicing-13-0-account_invoice_refund_link/pt_BR/
…edit note invoice has done from sale order.
Currently translated at 91.6% (11 of 12 strings) Translation: account-invoicing-15.0/account-invoicing-15.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-15-0/account-invoicing-15-0-account_invoice_refund_link/ca/
With the previous algorithm, if something modifies the order of the returned lines, there are chances of linking invoice lines with non refund lines (but other journal items). We assure at least that only refund lines are linked restricting the iteration on them. TT38633
3610b9b
to
530e3d0
Compare
Hi @ljsalvatierra-factorlibre , can you rebase? Please |
Yes, done! |
I get some errors when I try to access the credit notes from the "Refunds" tab. https://www.loom.com/share/5e13258bd407463496bd49aaf1d5a379 Thank you. Internal MT-1861 @moduon |
Thank you for the review, i'll check it. Edit: Related to odoo/odoo#106295 Edit: I've added a |
530e3d0
to
e11f429
Compare
Hi, is it ok to merge? Can anyone please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 👍
Thank you @ljsalvatierra-factorlibre
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
/ocabot merge patch
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at ac26e40. Thanks a lot for contributing to OCA. ❤️ |
Thank you for your time! |
Thank you :) |
#1250