Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
36301cb
[ADD] sale_order_invoice_amount
MateuGForgeFlow Apr 12, 2021
6ee0c9e
[IMP] sale_order_invoice_amount: black, isort, prettier
JasminSForgeFlow Dec 14, 2021
218588b
[MIG] sale_order_invoice_amount: Migration to 14.0
JasminSForgeFlow Dec 15, 2021
b880613
[MIG] sale_order_invoice_amount: Migration to 15.0
JasminSForgeFlow Dec 22, 2021
712939a
[MIG] sale_order_invoicing_finished_task: Migration to 15.0
cesar-tecnativa Jun 30, 2022
c0fe3b2
[MIG] sale_order_invoice_amount: Migration to 16.0
Mar 22, 2023
15c5dd3
[UPD] README.rst
OCA-git-bot Jun 5, 2023
ab141a9
Update translation files
weblate Jun 5, 2023
262da22
[UPD] README.rst
OCA-git-bot Sep 3, 2023
c845441
Added translation using Weblate (French)
Oct 28, 2023
42cdbff
Translated using Weblate (French)
Oct 28, 2023
46d3524
Added translation using Weblate (Italian)
mymage Dec 1, 2023
369249e
Translated using Weblate (Italian)
mymage Dec 4, 2023
26be062
[IMP] sale_order_invoice_amount: make sure to respect currencies
DavidJForgeFlow Mar 25, 2024
2b07e41
[IMP] sale_order_invoice_amount: uninvoiced amount checks qty invoice…
DavidJForgeFlow Mar 27, 2024
78b0a9d
[BOT] post-merge updates
OCA-git-bot Jun 3, 2024
272858c
[IMP] sale_order_invoice_amount: pre-commit stuff
MeritxellAForgeFlow Jan 10, 2025
35a26e0
[MIG] sale_order_invoice_amount: Migration to 17.0
MeritxellAForgeFlow Jan 14, 2025
ec25a9b
[IMP] sale_order_invoice_amount: Invoice calculation based on quantities
MeritxellAForgeFlow Jan 30, 2025
fffffff
[IMP] sale_order_invoice_amount: pre-commit auto fixes
sbiosca-s73 Jul 17, 2025
d877f5d
[MIG] sale_order_invoice_amount: Migration to 18.0
sbiosca-s73 Jul 17, 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
82 changes: 82 additions & 0 deletions sale_order_invoice_amount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
=========================
Sale Order Invoice Amount
=========================

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

.. |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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/18.0/sale_order_invoice_amount
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_order_invoice_amount
: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/sale-workflow&target_branch=18.0
:alt: Try me on Runboat

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

This module adapts the computation of invoiced and to invoice amounts in
Sales Orders. When the company option "Enable amount invoiced based on
quantity" is activated, the values are calculated from the quantities
invoiced vs ordered, instead of relying only on invoice monetary
amounts.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_order_invoice_amount%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
------------

- Mateu Griful <[email protected]>
- Lois Rilo <[email protected]>
- Meritxell Abellan <[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/sale-workflow <https://github.com/OCA/sale-workflow/tree/18.0/sale_order_invoice_amount>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_order_invoice_amount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions sale_order_invoice_amount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

{
"name": "Sale Order Invoice Amount",
"version": "18.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales",
"license": "LGPL-3",
"summary": "Display the invoiced and uninvoiced total in the sale order",
"depends": ["sale"],
"data": ["views/sale_order_view.xml"],
"installable": True,
"assets": {
"web.assets_backend": ["sale_order_invoice_amount/static/src/xml/*"],
},
}
48 changes: 48 additions & 0 deletions sale_order_invoice_amount/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_invoice_amount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__invoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Invoiced Amount"
msgstr "Importe facturado"

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__invoiced_amount
msgid "Order amount already invoiced."
msgstr "Importe del pedido ya facturado."

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
msgid "Order amount to be invoiced"
msgstr "Importe del pedido pendiente de facturar"

#. module: sale_order_invoice_amount
#: model:ir.model,name:sale_order_invoice_amount.model_sale_order
msgid "Sales Order"
msgstr "Pedidos de venta"

#. module: sale_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Uninvoiced Amount"
msgstr "Importe no facturado"
50 changes: 50 additions & 0 deletions sale_order_invoice_amount/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_invoice_amount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-28 13:16+0000\n"
"Last-Translator: Nicolas JEUDY <[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_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__invoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Invoiced Amount"
msgstr "Montant facturé"

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__invoiced_amount
msgid "Order amount already invoiced."
msgstr "Montant de commande déjà facturé."

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
msgid "Order amount to be invoiced"
msgstr "Montant de commande à facturer"

#. module: sale_order_invoice_amount
#: model:ir.model,name:sale_order_invoice_amount.model_sale_order
msgid "Sales Order"
msgstr "Bon de commande"

#. module: sale_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Uninvoiced Amount"
msgstr "Montant à facturer"
50 changes: 50 additions & 0 deletions sale_order_invoice_amount/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_invoice_amount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-04 09:34+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_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__invoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Invoiced Amount"
msgstr "Importo fatturato"

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__invoiced_amount
msgid "Order amount already invoiced."
msgstr "Importo ordine già fatturato."

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
msgid "Order amount to be invoiced"
msgstr "Importo ordine da fatturare"

#. module: sale_order_invoice_amount
#: model:ir.model,name:sale_order_invoice_amount.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: sale_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Uninvoiced Amount"
msgstr "Importo non fatturato"
47 changes: 47 additions & 0 deletions sale_order_invoice_amount/i18n/sale_order_invoice_amount.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_invoice_amount
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: sale_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__invoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Invoiced Amount"
msgstr ""

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__invoiced_amount
msgid "Order amount already invoiced."
msgstr ""

#. module: sale_order_invoice_amount
#: model:ir.model.fields,help:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
msgid "Order amount to be invoiced"
msgstr ""

#. module: sale_order_invoice_amount
#: model:ir.model,name:sale_order_invoice_amount.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_order_invoice_amount
#. odoo-javascript
#: code:addons/sale_order_invoice_amount/static/src/xml/tax_totals.xml:0
#: model:ir.model.fields,field_description:sale_order_invoice_amount.field_sale_order__uninvoiced_amount
#: model_terms:ir.ui.view,arch_db:sale_order_invoice_amount.view_order_tree_invoiced_amount
#, python-format
msgid "Uninvoiced Amount"
msgstr ""
1 change: 1 addition & 0 deletions sale_order_invoice_amount/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
39 changes: 39 additions & 0 deletions sale_order_invoice_amount/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (C) 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from odoo import api, models
from odoo.tools.misc import formatLang


class SaleOrder(models.Model):
_inherit = "sale.order"

@api.depends(
"order_line.tax_id",
"order_line.price_unit",
"amount_total",
"amount_untaxed",
"state",
"invoice_ids",
"invoice_ids.amount_total_in_currency_signed",
"amount_total",
"invoice_ids.state",
)
def _compute_tax_totals(self):
res = super()._compute_tax_totals()
for order in self:
lang_env = order.with_context(lang=order.partner_id.lang).env
order.tax_totals.update(
{
"amount_invoiced": order.amount_invoiced,
"formatted_amount_invoiced": formatLang(
lang_env, order.amount_invoiced, currency_obj=order.currency_id
),
"amount_to_invoice": order.amount_to_invoice,
"formatted_amount_to_invoice": formatLang(
lang_env,
order.amount_to_invoice,
currency_obj=order.currency_id,
),
}
)
return res
3 changes: 3 additions & 0 deletions sale_order_invoice_amount/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions sale_order_invoice_amount/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Mateu Griful \<<[email protected]>\>
- Lois Rilo \<<[email protected]>\>
- Meritxell Abellan \<<[email protected]>\>
2 changes: 2 additions & 0 deletions sale_order_invoice_amount/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module adapts the computation of invoiced and to invoice amounts in Sales Orders.
When the company option "Enable amount invoiced based on quantity" is activated, the values are calculated from the quantities invoiced vs ordered, instead of relying only on invoice monetary amounts.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading