Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
104 changes: 104 additions & 0 deletions sale_order_amount_to_invoice/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
============================
Sale Order Amount to Invoice
============================

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

.. |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-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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/17.0/sale_order_amount_to_invoice
: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-17-0/sale-workflow-17-0-sale_order_amount_to_invoice
: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=17.0
:alt: Try me on Runboat

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

This module adds "Amount to Invoice" for quotations/sales orders. It is
displayed:

- In order lines. You need to show this field because it's hidden by
default
- In the quotation form view
- In the quotation list view. You need to show this field because it's
hidden by default

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

Sometimes you would like to see total amount to invoice for all your
sales orders.

Configuration
=============

No configuration is required.

Usage
=====

You need to click the list view setting (the last column in the list
view) and enable "Amount to Invoice" to show this filed in the list
view. Same thing for the quotation order lines.

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_amount_to_invoice%0Aversion:%2017.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
-------

* Cetmix

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

- `Cetmix <https://www.cetmix.com>`__:

- Ivan Sokolov
- Dessan Hemrayev

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/17.0/sale_order_amount_to_invoice>`_ 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_amount_to_invoice/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions sale_order_amount_to_invoice/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2024 Cetmix OÜ
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Order Amount to Invoice",
"version": "17.0.1.0.0",
"author": "Cetmix, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales",
"license": "AGPL-3",
"summary": "Show total amount to invoice in quotations/sales orders ",
"depends": [
"sale",
"account",
],
"data": [
"views/sale_order_view.xml",
],
"installable": True,
}
34 changes: 34 additions & 0 deletions sale_order_amount_to_invoice/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_amount_to_invoice
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-27 11:25+0000\n"
"Last-Translator: Francesco Foresti <francesco.foresti@ooops404.com>\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 5.10.4\n"

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

#. module: sale_order_amount_to_invoice
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_order_form
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_order_tree
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_quotation_tree
msgid "To Invoice"
msgstr "Da fatturare"

#. module: sale_order_amount_to_invoice
#: model:ir.model.fields,field_description:sale_order_amount_to_invoice.field_sale_order__untaxed_amount_to_invoice
msgid "Untaxed Amount To Invoice"
msgstr "Importo imponibile da fatturare"
31 changes: 31 additions & 0 deletions sale_order_amount_to_invoice/i18n/sale_order_amount_to_invoice.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_amount_to_invoice
#
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_amount_to_invoice
#: model:ir.model,name:sale_order_amount_to_invoice.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_order_amount_to_invoice
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_order_form
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_order_tree
#: model_terms:ir.ui.view,arch_db:sale_order_amount_to_invoice.view_quotation_tree
msgid "To Invoice"
msgstr ""

#. module: sale_order_amount_to_invoice
#: model:ir.model.fields,field_description:sale_order_amount_to_invoice.field_sale_order__untaxed_amount_to_invoice
msgid "Untaxed Amount To Invoice"
msgstr ""
1 change: 1 addition & 0 deletions sale_order_amount_to_invoice/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
26 changes: 26 additions & 0 deletions sale_order_amount_to_invoice/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright (C) 2024 Cetmix OÜ
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


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

untaxed_amount_to_invoice = fields.Monetary(
compute="_compute_untaxed_amount_to_invoice", store=True
)

@api.depends("order_line.untaxed_amount_to_invoice")
def _compute_untaxed_amount_to_invoice(self):
"""Compute the total invoice amount for each sales order."""
result = self.env["sale.order.line"].read_group(
[("order_id", "in", self.ids)],
["untaxed_amount_to_invoice:sum", "order_id"],
["order_id"],
)
amounts = {
item["order_id"][0]: item["untaxed_amount_to_invoice"] for item in result
}
for order in self:
order.untaxed_amount_to_invoice = amounts.get(order.id, 0)
3 changes: 3 additions & 0 deletions sale_order_amount_to_invoice/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions sale_order_amount_to_invoice/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No configuration is required.
1 change: 1 addition & 0 deletions sale_order_amount_to_invoice/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sometimes you would like to see total amount to invoice for all your sales orders.
3 changes: 3 additions & 0 deletions sale_order_amount_to_invoice/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Cetmix](https://www.cetmix.com):
- Ivan Sokolov
- Dessan Hemrayev
5 changes: 5 additions & 0 deletions sale_order_amount_to_invoice/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module adds "Amount to Invoice" for quotations/sales orders. It is displayed:

- In order lines. You need to show this field because it's hidden by default
- In the quotation form view
- In the quotation list view. You need to show this field because it's hidden by default
1 change: 1 addition & 0 deletions sale_order_amount_to_invoice/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You need to click the list view setting (the last column in the list view) and enable "Amount to Invoice" to show this filed in the list view. Same thing for the quotation order lines.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading