-
-
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
[18.0][MIG] account_invoice_refund_link: Migration to 18.0 #1850
[18.0][MIG] account_invoice_refund_link: Migration to 18.0 #1850
Conversation
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 100.0% (12 of 12 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/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_refund_link/es/
Currently translated at 83.3% (10 of 12 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_refund_link/fr/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_refund_link/es_AR/
Currently translated at 91.6% (11 of 12 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_refund_link/fr_FR/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-14.0/account-invoicing-14.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-14-0/account-invoicing-14-0-account_invoice_refund_link/pt_PT/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_refund_link/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_refund_link/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_refund_link/sv/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_refund_link/it/
Currently translated at 100.0% (12 of 12 strings) Translation: account-invoicing-17.0/account-invoicing-17.0-account_invoice_refund_link Translate-URL: https://translation.odoo-community.org/projects/account-invoicing-17-0/account-invoicing-17-0-account_invoice_refund_link/pt/
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, tested in runboat
/ocabot migration account_invoice_refund_link |
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!
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
This PR has the |
@@ -90,6 +90,10 @@ Contributors | |||
|
|||
- Luis J. Salvatierra <[email protected]> | |||
|
|||
- `Factor Libre <https://factorlibre.com>`__: | |||
|
|||
- Luis J. Salvatierra <[email protected]> |
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.
This contributor is being added at 18.0 migration commit, which doesn't sound correct.
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.
Fixed!
803fe04
to
2247877
Compare
2247877
to
e28fc73
Compare
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.
/ocabot merge nobump
On my way to merge this fine PR! |
Congratulations, your PR was merged at 94bda72. Thanks a lot for contributing to OCA. ❤️ |
Module migrated to version 18.0
cc https://github.com/APSL 163709
@miquelalzanillas @javierobcn @mpascuall @BernatObrador @ppyczko please review