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
86 changes: 86 additions & 0 deletions purchase_order_uninvoiced_amount_line/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================================
Purchase Order Line Uninvoiced Amount
=====================================

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

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

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

Show uninvoiced amount on purchase order line tree.

**Table of contents**

.. contents::
:local:

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

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

- `ForgeFlow <https://www.forgeflow.com>`__:

- Joan Sisquella

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/19.0/purchase_order_uninvoiced_amount_line>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions purchase_order_uninvoiced_amount_line/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
16 changes: 16 additions & 0 deletions purchase_order_uninvoiced_amount_line/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Purchase Order Line Uninvoiced Amount",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "19.0.1.0.0",
"development_status": "Beta",
"website": "https://github.com/OCA/purchase-workflow",
"category": "Purchase",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["purchase", "purchase_order_line_menu"],
"data": ["views/purchase_order_line_views.xml"],
}
28 changes: 28 additions & 0 deletions purchase_order_uninvoiced_amount_line/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_uninvoiced_amount_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-09-16 10:20+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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: purchase_order_uninvoiced_amount_line
#: model:ir.model,name:purchase_order_uninvoiced_amount_line.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Riga ordine di acquisto"

#. module: purchase_order_uninvoiced_amount_line
#: model:ir.model.fields,field_description:purchase_order_uninvoiced_amount_line.field_purchase_order_line__amount_uninvoiced
#: model_terms:ir.ui.view,arch_db:purchase_order_uninvoiced_amount_line.purchase_order_line_tree_uninvoiced
msgid "Uninvoiced Amount"
msgstr "Importo non fatturato"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_uninvoiced_amount_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: purchase_order_uninvoiced_amount_line
#: model:ir.model,name:purchase_order_uninvoiced_amount_line.model_purchase_order_line
msgid "Purchase Order Line"
msgstr ""

#. module: purchase_order_uninvoiced_amount_line
#: model:ir.model.fields,field_description:purchase_order_uninvoiced_amount_line.field_purchase_order_line__amount_uninvoiced
#: model_terms:ir.ui.view,arch_db:purchase_order_uninvoiced_amount_line.purchase_order_line_tree_uninvoiced
msgid "Uninvoiced Amount"
msgstr ""
4 changes: 4 additions & 0 deletions purchase_order_uninvoiced_amount_line/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import purchase_order_line
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo import api, fields, models


class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"

@api.depends(
"product_qty",
"qty_invoiced",
"qty_received",
"product_id",
"product_uom_id",
"price_unit",
"price_subtotal",
)
def _compute_amount_uninvoiced(self):
for line in self:
if line.product_id.purchase_method == "purchase":
qty = line.product_qty - line.qty_invoiced
else:
qty = line.qty_received - line.qty_invoiced
price_unit = (
line.price_subtotal / line.product_qty
if line.product_qty
else line.price_unit
)
amount_uninvoiced = max(0, qty * price_unit)
line.amount_uninvoiced = line.currency_id.round(amount_uninvoiced)

amount_uninvoiced = fields.Monetary(
string="Uninvoiced Amount",
readonly=True,
compute="_compute_amount_uninvoiced",
store=True,
currency_field="currency_id",
)
3 changes: 3 additions & 0 deletions purchase_order_uninvoiced_amount_line/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions purchase_order_uninvoiced_amount_line/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [ForgeFlow](https://www.forgeflow.com):
- Joan Sisquella
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show uninvoiced amount on purchase order line tree.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading