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

[16.0] [ADD] mrp_order_report_reserved #138

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from
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
87 changes: 87 additions & 0 deletions mrp_order_report_reserved/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
====================================================================
Display Component's Reserved Quantity on the Production Order Report
====================================================================

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

.. |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%2Fmanufacture--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_order_report_reserved
:alt: OCA/manufacture-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/manufacture-reporting-16-0/manufacture-reporting-16-0-mrp_order_report_reserved
: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/manufacture-reporting&target_branch=16.0
:alt: Try me on Runboat

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

This module adds a "Reserved" column to the MRP order report, showing
the reserved quantities for unfinished orders.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/manufacture-reporting/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/manufacture-reporting/issues/new?body=module:%20mrp_order_report_reserved%0Aversion:%2016.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
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <[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.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/manufacture-reporting <https://github.com/OCA/manufacture-reporting/tree/16.0/mrp_order_report_reserved>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
14 changes: 14 additions & 0 deletions mrp_order_report_reserved/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2025 Camptocamp SA (https://www.camptocamp.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Display Component's Reserved Quantity on the Production Order Report",
"version": "16.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture-reporting",
"license": "AGPL-3",
"maintainers": ["ivantodorovich"],
"category": "Manufacturing",
"depends": ["mrp"],
"data": ["reports/mrp_order_report.xml"],
}
3 changes: 3 additions & 0 deletions mrp_order_report_reserved/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Camptocamp <https://www.camptocamp.com>`_

* Iván Todorovich <[email protected]>
2 changes: 2 additions & 0 deletions mrp_order_report_reserved/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module adds a "Reserved" column to the MRP order report, showing
the reserved quantities for unfinished orders.
40 changes: 40 additions & 0 deletions mrp_order_report_reserved/reports/mrp_order_report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2025 Camptocamp SA (https://www.camptocamp.com).
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>

<template
id="report_mrp_production_components"
inherit_id="mrp.report_mrp_production_components"
priority="5"
>
<!-- Display the column only if there are reserved quantities -->
<xpath expr="//table/thead" position="before">
<t
t-set="has_reserved_quantities"
t-value="o.state in ('confirmed', 'progress') and any(move_line.reserved_uom_qty for move_line in o.move_raw_ids.move_line_ids)"
/>
</xpath>
<xpath expr="//table/thead/tr/th[2]" position="after">
<th
t-if="has_reserved_quantities"
t-attf-class="{{ 'text-end' if not has_product_barcode else '' }}"
name="reserved"
>Reserved</th>
</xpath>
<xpath expr="//table/tbody/tr/td[2]" position="after">
<td
t-if="has_reserved_quantities"
t-attf-class="{{ 'text-end' if not has_product_barcode else '' }}"
name="reserved"
>
<div>
<span t-field="raw_line.reserved_availability" />
</div>
</td>
</xpath>
</template>

</odoo>
Loading