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

[18.0][MIG] account_invoice_refund_link: Migration to 18.0 #1850

Merged
merged 55 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
106305c
account_refund_original
antespi Jul 25, 2016
448913e
remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
121043c
Make modules uninstallable
pedrobaeza Oct 6, 2016
fb7047b
Rename manifest files
pedrobaeza Oct 6, 2016
a4d0ed8
account_invoice_refund_link: Improvements + cleaning
pedrobaeza Dec 11, 2016
3d157c9
account_invoice_refund_link: Migrated to 10.0
luismontalba Apr 10, 2017
d302af7
fix init hook by matching invoices and refunds only if in same company
Jul 6, 2017
0896476
account_invoice_refund_link: Don't copy m2m fields (#339)
pedrobaeza Nov 30, 2017
539e672
account_invoice_refund_link: Migration to 11.0
oihane Oct 25, 2017
3e454ec
account_invoice_refund_link: Don't choke with standard fields
pedrobaeza Mar 29, 2018
1b21de7
account_invoice_refund_link: Pylint
pedrobaeza Mar 29, 2018
2f0ac5a
[MIG] account_invoice_refund_link v11 to v12
Nikul-Chaudhary Jan 27, 2019
2e2261f
Translated using Weblate (German)
marylla Jul 17, 2019
9c27a69
Translated using Weblate (Portuguese (Brazil))
Sep 23, 2019
4b9d8d7
[IMP] account_invoice_refund_link: black, isort
ernestotejeda Jan 20, 2020
59d44bc
[MIG] account_invoice_refund_link: Migration to 13.0
ernestotejeda Jan 21, 2020
53e132e
Translated using Weblate (Portuguese (Brazil))
Jul 1, 2020
4e94836
[FIX] account_invoice_refund_link: Fix foreignkey exception when a cr…
sergio-teruel Jul 14, 2020
024c881
Translated using Weblate (Portuguese (Brazil))
Aug 12, 2020
5bd60a9
[OU] account_invoice_refund_link: Migration scripts
pedrobaeza Dec 4, 2020
a0f37b3
[MIG] account_invoice_refund_link: Migration to 14.0
joao-p-marques Feb 1, 2021
6aa2dee
Translated using Weblate (Spanish)
anasuarez1 Mar 10, 2021
b88847d
Translated using Weblate (French)
Yvesldff Mar 22, 2021
48eefaa
Translated using Weblate (Spanish (Argentina))
ibuioli Mar 31, 2021
1d805ae
Translated using Weblate (French (France))
Yvesldff Apr 6, 2021
1c7634f
Translated using Weblate (Portuguese (Portugal))
pedrocs-exo Sep 4, 2021
255870b
[14.0][IMP] acount_invoice_refund_link: add index
acsonefho Nov 16, 2021
5ce71f9
[MIG] account_invoice_refund_link: Migration to 15.0
koenloodts Dec 17, 2021
904a6f4
[FIX] account_invoice_refund_link: Fix development_status
ValentinVinagre Dec 28, 2021
887ae0b
[15.0][MIG] account_invoice_tree_currency: Migration to 15.0
OriolVForgeFlow Nov 24, 2021
1886031
Translated using Weblate (Catalan)
pablontura Apr 27, 2022
4c45b7c
[FIX] account_invoice_refund_link: Don't link incorrect lines
pedrobaeza Aug 23, 2022
ac35fef
[MIG] account_invoice_refund_link: Migration to 16.0
ljsalvatierra-factorlibre Oct 14, 2022
a8b35f4
Translated using Weblate (Croatian)
badbole Jan 30, 2023
53ac411
Translated using Weblate (Portuguese)
pedrocs-exo Feb 27, 2023
641d22e
[FIX] account_invoice_refund_link: Exclude section/notes origin lines
Feb 27, 2023
3b85e56
[16.0][IMP] added tree with refunded lines
andrel-exo Jul 24, 2023
88e2092
[IMP] account_invoice_refund_link: Make more reliable the linking
pedrobaeza Aug 7, 2023
6be7b54
Translated using Weblate (Spanish)
Ivorra78 Oct 10, 2023
0aa1371
[IMP] account_invoice_refund_link: test performance improvement
josep-tecnativa Oct 13, 2023
9f90ccf
Translated using Weblate (Portuguese (Brazil))
adrianojprado Oct 30, 2023
f86d015
Translated using Weblate (Italian)
mymage Feb 21, 2024
f2c09f0
[IMP] account_invoice_refund_link: pre-commit auto fixes
andrel-exo Mar 26, 2024
b802655
[MIG] account_invoice_refund_link: Migration to 17.0
andrel-exo Mar 26, 2024
2dad15b
[UPD] Update account_invoice_refund_link.pot
May 3, 2024
0dc2343
[BOT] post-merge updates
OCA-git-bot May 3, 2024
2a710c5
Update translation files
weblate May 3, 2024
02cd598
[FIX] account_invoice_refund_link: Form view for refund invoices
manuelregidor May 29, 2024
5f39028
[UPD] Update account_invoice_refund_link.pot
May 29, 2024
7192fb9
[BOT] post-merge updates
OCA-git-bot May 29, 2024
0fe415e
Update translation files
weblate May 29, 2024
145cb40
Translated using Weblate (Swedish)
jakobkrabbe Jun 5, 2024
720133b
Translated using Weblate (Italian)
francesco-ooops Jun 25, 2024
ff63351
Translated using Weblate (Portuguese)
pedrocs-exo Jul 8, 2024
e28fc73
[MIG] account_invoice_refund_link: Migration to 18.0
peluko00 Nov 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions account_invoice_refund_link/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
=========================================================
Show links between refunds and their originator invoices.
=========================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5d055f37667a6cc4449aec9c2cc26de10d3e618472f848eb4afad47f8747f421
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
:target: https://odoo-community.org/page/development-status
:alt: Mature
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/18.0/account_invoice_refund_link
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-18-0/account-invoicing-18-0-account_invoice_refund_link
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-invoicing&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module shows the links between refunds and their original invoices
in the invoice form and also keep track of refund lines and their
original invoice lines.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Go to "Invoicing -> customers -> Invoices", create an Invoice and
validate it by clicking on the 'Confirm' button.
2. Create a Credit Note by clicking on the 'Add Credit Note' button.
3. In the form view of that Credit Note you can see the new field
'Invoice reference' that is a link to the Original Invoice (the one
you created in step 1)
4. Come back to the original Invoice created in step 1 and you will see
a new page in the notebook called 'Refunds'. There will be the Credit
Note that you created in the previous step.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-invoicing/issues/new?body=module:%20account_invoice_refund_link%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Pexego
* Tecnativa

Contributors
------------

- Pexego Sistemas Informáticos. (http://pexego.es)

- Nikul Chaudhary <[email protected]>

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Antonio Espinosa
- Luis M. Ontalba
- Ernesto Tejeda
- João Marques

- `Factor Libre <https://factorlibre.com>`__:

- Luis J. Salvatierra <[email protected]>

- `APSL-Nagarro <https://www.apsl.tech>`__:

- Antoni Marroig <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/18.0/account_invoice_refund_link>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions account_invoice_refund_link/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
from .hooks import post_init_hook
19 changes: 19 additions & 0 deletions account_invoice_refund_link/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2004-2011 Pexego Sistemas Informáticos. (http://pexego.es)
# Copyright 2016 Antonio Espinosa <[email protected]>
# Copyright 2021 Tecnativa - João Marques
# Copyright 2014-2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Show links between refunds and their originator invoices.",
"version": "18.0.1.0.0",
"development_status": "Mature",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/account-invoicing",
"author": "Pexego, Tecnativa, Odoo Community Association (OCA)",
"installable": True,
"post_init_hook": "post_init_hook",
"depends": ["account"],
"license": "AGPL-3",
"data": ["views/account_invoice_view.xml"],
}
34 changes: 34 additions & 0 deletions account_invoice_refund_link/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2016 Antonio Espinosa <[email protected]>
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


def match_origin_lines(refund):
"""Try to match lines by product or by description."""
invoice = refund.reversed_entry_id
invoice_lines = invoice.invoice_line_ids
for refund_line in refund.invoice_line_ids:
for invoice_line in invoice_lines:
match = (
refund_line.product_id
and refund_line.product_id == invoice_line.product_id
or refund_line.name == invoice_line.name
)
if match:
invoice_lines -= invoice_line
refund_line.origin_line_id = invoice_line.id
break
if not invoice_lines:
break


def post_init_hook(env):
# Linking all refund invoices to its original invoices
refunds = env["account.move"].search(
[
("move_type", "in", ("out_refund", "in_refund")),
("reversed_entry_id", "!=", False),
]
)
for refund in refunds:
match_origin_lines(refund)
79 changes: 79 additions & 0 deletions account_invoice_refund_link/i18n/account_invoice_refund_link.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_refund_link
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move_reversal
msgid "Account Move Reversal"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Invoice reference"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move_line__origin_line_id
msgid "Original invoice line"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,help:account_invoice_refund_link.field_account_move_line__origin_line_id
msgid "Original invoice line to which this refund invoice line is referred to"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_bank_statement_line__refund_invoice_ids
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move__refund_invoice_ids
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_payment__refund_invoice_ids
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
msgid "Refund Invoices"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move_line__refund_line_ids
msgid "Refund invoice lines"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,help:account_invoice_refund_link.field_account_move_line__refund_line_ids
msgid "Refund invoice lines created from this invoice line"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Refunds"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Status"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Total"
msgstr ""
88 changes: 88 additions & 0 deletions account_invoice_refund_link/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_refund_link
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-11 02:41+0000\n"
"PO-Revision-Date: 2018-04-11 02:41+0000\n"
"Last-Translator: OCA Transbot <[email protected]>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move_reversal
msgid "Account Move Reversal"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
#, fuzzy
msgid "Invoice reference"
msgstr "خط الفاتورة"

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model,name:account_invoice_refund_link.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move_line__origin_line_id
msgid "Original invoice line"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,help:account_invoice_refund_link.field_account_move_line__origin_line_id
msgid "Original invoice line to which this refund invoice line is referred to"
msgstr ""

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_bank_statement_line__refund_invoice_ids
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move__refund_invoice_ids
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_payment__refund_invoice_ids
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
#, fuzzy
msgid "Refund Invoices"
msgstr "فاتورة"

#. module: account_invoice_refund_link
#: model:ir.model.fields,field_description:account_invoice_refund_link.field_account_move_line__refund_line_ids
#, fuzzy
msgid "Refund invoice lines"
msgstr "خط الفاتورة"

#. module: account_invoice_refund_link
#: model:ir.model.fields,help:account_invoice_refund_link.field_account_move_line__refund_line_ids
msgid "Refund invoice lines created from this invoice line"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Refunds"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Status"
msgstr ""

#. module: account_invoice_refund_link
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.account_invoice_refund_form_view
#: model_terms:ir.ui.view,arch_db:account_invoice_refund_link.view_customer_account_invoice_add_refunds_details_form
msgid "Total"
msgstr "الإجمالي"
Loading
Loading