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][MIG] sale_line_refund_to_invoice_qty #1903

Open
wants to merge 22 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ed817db
[ADD] sale_line_credit_note_invoiced_qty
JordiMForgeFlow Jun 22, 2021
f4f7d6d
[13.0][IMP]sale_line_refund_to_invoice_qty: add refund option explana…
JordiMForgeFlow Aug 3, 2021
12d86ce
[IMP]sale_line_refund_to_invoice_qty: do not use negative booleans
AaronHForgeFlow Aug 27, 2021
6c238d1
[14.0][MIG]sale_line_refund_to_invoice_qty: Migration to 14.0
GuillemCForgeFlow Nov 26, 2021
4a518a9
[MIG] sale_line_refund_to_invoice_qty: Migration to 15.0
JasminSForgeFlow Jun 28, 2022
297574b
[FIX] sale_line_refund_to_invoice_qty: do not change invoiced qty
LoisRForgeFlow Dec 27, 2022
3f3cbeb
[15.0][FIX] sale_line_refund_to_invoice_qty, fix default value on aml
ChrisOForgeFlow Feb 16, 2023
8c68f82
[MIG] sale_line_refund_to_invoice_qty: Migration to 16.0
Jul 6, 2023
92120a3
[UPD] Update sale_line_refund_to_invoice_qty.pot
Aug 7, 2023
6b32b29
[UPD] README.rst
OCA-git-bot Aug 7, 2023
4d2ad58
Update translation files
weblate Aug 7, 2023
b27ffdd
[UPD] README.rst
OCA-git-bot Sep 3, 2023
4029056
Added translation using Weblate (French)
remi-filament Dec 1, 2023
8fc594a
Translated using Weblate (French)
remi-filament Dec 1, 2023
e08db1d
Added translation using Weblate (Italian)
mymage Feb 23, 2024
7dd53b1
Translated using Weblate (Italian)
mymage Feb 23, 2024
cd3ffa6
[IMP] sale_line_refund_to_invoice_qty: Initialize value with sql default
rousseldenis Feb 4, 2025
695ee1f
[BOT] post-merge updates
OCA-git-bot Feb 5, 2025
d519076
[IMP]sale_line_refund_to_invoice_qty: credit note default
PicchiSeba Jun 26, 2024
46e02b6
[IMP] sale_line_refund_to_invoice_qty: pre-commit auto fixes
florian-dacosta Feb 7, 2025
972f346
[MIG] sale_line_refund_to_invoice_qty to 18
florian-dacosta Feb 7, 2025
6f4762a
[IMP] Hide sale_qty_to_reinvoice when the refund is not linked to sale
florian-dacosta Feb 7, 2025
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
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated from manifests external_dependencies
openupgradelib
97 changes: 97 additions & 0 deletions sale_line_refund_to_invoice_qty/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
===============================
Sale Line Refund To Invoice Qty
===============================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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/sale_line_refund_to_invoice_qty
: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-sale_line_refund_to_invoice_qty
: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 allows the user to choose whether refunded quantities in
credit notes should be considered as quantities to be reinvoiced in the
related sales, thus deciding if they should be added or not to the
quantity to invoice of the related sales order line.

**Table of contents**

.. contents::
:local:

Usage
=====

When creating a credit note from an invoice, you can mark the checkbox
"Not reinvoice refunded quantity" to prevent the refunded quantities to
be deducted from the quantity invoiced of the related sales order lines.

Furthermore, after creating the credit note, you can mark the field
"Sale qty not to reinvoice" to decide the criteria to be used for each
specific invoice line.

Enabling the "Reinvoice credit note by default" flag in the Invoice
settings, will enable the "This credit note will be reinvoiced" flag on
Credit Notes by default.

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:%20sale_line_refund_to_invoice_qty%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
-------

* ForgeFlow

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

- Jordi Masvidal <[email protected]>
- Lois Rilo <[email protected]>
- Denis Roussel <[email protected]>
- Florian da Costa <[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/sale_line_refund_to_invoice_qty>`_ 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 sale_line_refund_to_invoice_qty/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from .hooks import pre_init_hook
from . import models
from . import wizards
25 changes: 25 additions & 0 deletions sale_line_refund_to_invoice_qty/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "Sale Line Refund To Invoice Qty",
"summary": """Allow deciding whether refunded quantity should be considered
as quantity to reinvoice""",
"version": "18.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/account-invoicing",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": ["sale_management"],
"data": [
"views/account_move_views.xml",
"views/res_config_settings_views.xml",
"views/sale_order_views.xml",
"wizards/account_move_reversal_view.xml",
],
"external_dependencies": {
"python": ["openupgradelib"],
},
"pre_init_hook": "pre_init_hook",
}
25 changes: 25 additions & 0 deletions sale_line_refund_to_invoice_qty/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2025 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade


def pre_init_hook(env):
"""
Initialize 'sale_qty_to_reinvoice' field with sql default value
for performances reasons as Odoo does it with an update instead.
"""
if openupgrade.column_exists(env.cr, "account_move_line", "sale_qty_to_reinvoice"):
return

Check warning on line 12 in sale_line_refund_to_invoice_qty/hooks.py

View check run for this annotation

Codecov / codecov/patch

sale_line_refund_to_invoice_qty/hooks.py#L12

Added line #L12 was not covered by tests

field_spec = [
(
"sale_qty_to_reinvoice",
"account.move.line",
"account_move_line",
"boolean",
"boolean",
"sale_line_refund_to_invoice_qty",
True,
)
]
openupgrade.add_fields(env, field_spec=field_spec)
74 changes: 74 additions & 0 deletions sale_line_refund_to_invoice_qty/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_line_refund_to_invoice_qty
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_reversal
msgid "Account Move Reversal"
msgstr "Reversión de asiento contable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move
msgid "Journal Entry"
msgstr "Asiento contable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_line
msgid "Journal Item"
msgstr "Apunte contable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Leave it marked if you will reinvoice the same sale order line"
msgstr ""
"Déjelo marcado si va a volver a facturar la misma línea de pedido de venta"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid ""
"Leave it marked if you will reinvoice the same sale order line (standard "
"behaviour)"
msgstr ""
"Déjelo marcado si va a volver a facturar la misma línea de pedido de venta "
"(comportamiento estándar)"

#. module: sale_line_refund_to_invoice_qty
#: model_terms:ir.ui.view,arch_db:sale_line_refund_to_invoice_qty.view_account_move_reversal
msgid ""
"Leave it marked when other customer invoices are expected for the quantities "
"in the credit note."
msgstr ""
"Déjelo marcado cuando se esperen otras facturas de clientes por las "
"cantidades de la factura rectificativa."

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_sale_order_line__qty_refunded_not_invoiceable
msgid "Quantity Refunded Not Invoiceable"
msgstr "Cantidad reembolsada no facturable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Sale Qty To Reinvoice"
msgstr "Cantidad de venta a refacturar"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de pedido de venta"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid "This credit note will be reinvoiced"
msgstr "Esta factura rectificativa será refacturada"
75 changes: 75 additions & 0 deletions sale_line_refund_to_invoice_qty/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_line_refund_to_invoice_qty
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-01 14:33+0000\n"
"Last-Translator: Rémi <[email protected]>\n"
"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_reversal
msgid "Account Move Reversal"
msgstr "Extourne de la pièce comptable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move
msgid "Journal Entry"
msgstr "Pièce comptable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_line
msgid "Journal Item"
msgstr "Écriture comptable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Leave it marked if you will reinvoice the same sale order line"
msgstr "Laisser coché si vous allez refacturer la même ligne de vente"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid ""
"Leave it marked if you will reinvoice the same sale order line (standard "
"behaviour)"
msgstr ""
"Laisser coché si vous allez refacturer la même ligne de vente (comportement "
"par défaut)"

#. module: sale_line_refund_to_invoice_qty
#: model_terms:ir.ui.view,arch_db:sale_line_refund_to_invoice_qty.view_account_move_reversal
msgid ""
"Leave it marked when other customer invoices are expected for the quantities"
" in the credit note."
msgstr ""
"Laisser coché quand d'autres factures clients seront créées pour les "
"quantités remboursées dans l'avoir."

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_sale_order_line__qty_refunded_not_invoiceable
msgid "Quantity Refunded Not Invoiceable"
msgstr "Quantité remboursée non facturable"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Sale Qty To Reinvoice"
msgstr "Quantité à refacturer"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_sale_order_line
msgid "Sales Order Line"
msgstr "Ligne de bons de commande"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid "This credit note will be reinvoiced"
msgstr "Cet avoir sera refacturé"
75 changes: 75 additions & 0 deletions sale_line_refund_to_invoice_qty/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_line_refund_to_invoice_qty
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-23 10:37+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_reversal
msgid "Account Move Reversal"
msgstr "Storno movimento conto"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move
msgid "Journal Entry"
msgstr "Registrazione contabile"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_line
msgid "Journal Item"
msgstr "Movimento contabile"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Leave it marked if you will reinvoice the same sale order line"
msgstr "Lasciare impostato se si rifatturerà la stessa riga ordine di vendita"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid ""
"Leave it marked if you will reinvoice the same sale order line (standard "
"behaviour)"
msgstr ""
"Lasciare impostato se si rifatturerà la stessa riga ordine di vendita ("
"comportamento standard)"

#. module: sale_line_refund_to_invoice_qty
#: model_terms:ir.ui.view,arch_db:sale_line_refund_to_invoice_qty.view_account_move_reversal
msgid ""
"Leave it marked when other customer invoices are expected for the quantities"
" in the credit note."
msgstr ""
"Lasciare impostato quando si attendono altre fatture cliente per quantità "
"nella nota di credito."

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_sale_order_line__qty_refunded_not_invoiceable
msgid "Quantity Refunded Not Invoiceable"
msgstr "Qauntità rimborsata non fatturabile"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice
msgid "Sale Qty To Reinvoice"
msgstr "Q.tà vendita da rifatturare"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_sale_order_line
msgid "Sales Order Line"
msgstr "Riga ordine di vendita"

#. module: sale_line_refund_to_invoice_qty
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice
msgid "This credit note will be reinvoiced"
msgstr "Questa nota di credito verrà rifatturata"
Loading