Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6c493ab
[ADD] stock_picking_report_valued_sale_mrp: New module
chienandalu Nov 23, 2020
5286e5d
[FIX] stock_picking_report_valued_sale_mrp: error when no sale line
chienandalu Dec 16, 2020
8f2ac90
[FIX] stock_picking_report_valued_sale_mrp: ignored cancelled order
chienandalu Apr 22, 2021
0b6246c
[IMP] stock_picking_report_valued_sale_mrp: black, isort, prettier
chienandalu May 6, 2021
62fa335
[MIG] stock_picking_report_valued_sale_mrp: Migration to 13.0
chienandalu Jun 4, 2021
8b6d000
[FIX] stock_picking_report_valued_sale_mrp: Don't write on compute field
pedrobaeza Feb 25, 2022
9a40bb7
[FIX] stock_picking_report_valued_sale_mrp: Avoid inheritance problem
pedrobaeza Apr 30, 2022
14dbb5a
[FIX] stock_picking_report_valued_sale_mrp: multipicking
chienandalu Nov 23, 2021
967fbb3
[IMP] stock_picking_report_valued_sale_mrp: black, isort, prettier
Mar 1, 2023
3ba8bee
[MIG] stock_picking_report_valued_sale_mrp: Migration to 15.0
Mar 6, 2023
9264b0c
[UPD] Update stock_picking_report_valued_sale_mrp.pot
Mar 10, 2023
800e999
[UPD] README.rst
OCA-git-bot Mar 10, 2023
e4ee5cd
[REF] stock_picking_report_valued_sale_mrp: delivery report
Apr 19, 2023
6d07479
stock_picking_report_valued_sale_mrp 15.0.1.1.0
OCA-git-bot Aug 10, 2023
a8450cf
[UPD] README.rst
OCA-git-bot Sep 3, 2023
ddae32d
[FIX] stock_picking_report_valued_sale_mrp: non existing backorder_id…
pedrobaeza Jul 24, 2024
144381f
[BOT] post-merge updates
OCA-git-bot Jul 24, 2024
32385d6
[MIG] stock_picking_report_valued_sale_mrp: Migration to 16.0
aitoreizmendi Dec 10, 2024
a04051b
[UPD] Update stock_picking_report_valued_sale_mrp.pot
May 27, 2025
28c8090
[BOT] post-merge updates
OCA-git-bot May 27, 2025
18a8642
Added translation using Weblate (Italian)
mymage May 28, 2025
347018c
Translated using Weblate (Italian)
mymage Jun 4, 2025
60066fb
[IMP] stock_picking_report_valued_sale_mrp: pre-commit auto fixes
Anxo82 Dec 29, 2025
7d29e0d
[MIG] stock_picking_report_valued_sale_mrp: Migration to 18.0
Anxo82 Dec 30, 2025
a4f1a48
[UPD] Update stock_picking_report_valued_sale_mrp.pot
Apr 28, 2026
33adbad
[BOT] post-merge updates
OCA-git-bot Apr 28, 2026
c5b7622
[19.0][MIG] stock_picking_report_valued_sale_mrp: Migration to 19.0
Sadiq-OSI Jun 26, 2026
2b7307c
Merge branch '19.0' into work/migrate-stock-picking-report-valued-sal…
Sadiq-OSI Jul 24, 2026
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[stock_delivery_note](stock_delivery_note/) | 19.0.1.0.0 | | This module allows to fill in a delivery note that will be displayed on delivery report
[stock_move_value_report](stock_move_value_report/) | 19.0.1.0.0 | | Stock Move Cost Value Report
[stock_picking_report_external_note](stock_picking_report_external_note/) | 19.0.1.0.0 | <a href='https://github.com/Shide'><img src='https://github.com/Shide.png' width='32' height='32' style='border-radius:50%;' alt='Shide'/></a> | Adds a note in Stock Picking shown on external reports like Delivery Slip
[stock_picking_report_valued](stock_picking_report_valued/) | 19.0.1.0.1 | | Adding Valued Picking on Delivery Slip report
[stock_picking_report_valued_sale_mrp](stock_picking_report_valued_sale_mrp/) | 19.0.1.0.0 | <a href='https://github.com/chienandalu'><img src='https://github.com/chienandalu.png' width='32' height='32' style='border-radius:50%;' alt='chienandalu'/></a> | Allow to summarize the picking related with the selled kits
[stock_product_demand_info](stock_product_demand_info/) | 19.0.1.1.0 | <a href='https://github.com/ivantodorovich'><img src='https://github.com/ivantodorovich.png' width='32' height='32' style='border-radius:50%;' alt='ivantodorovich'/></a> | Past demand by configurable periods on product and orderpoint
[stock_picking_report_external_note](stock_picking_report_external_note/) | 19.0.1.0.0 | <a href='https://github.com/Shide'><img src='https://github.com/Shide.png' width='32' height='32' style='border-radius:50%;' alt='Shide'/></a> | Adds a note in Stock Picking shown on external reports like Delivery Slip

[//]: # (end addons)

Expand Down
1 change: 1 addition & 0 deletions setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies = [
"odoo-addon-stock_move_value_report==19.0.*",
"odoo-addon-stock_picking_report_external_note==19.0.*",
"odoo-addon-stock_picking_report_valued==19.0.*",
"odoo-addon-stock_picking_report_valued_sale_mrp==19.0.*",
"odoo-addon-stock_product_demand_info==19.0.*",
]
classifiers=[
Expand Down
118 changes: 118 additions & 0 deletions stock_picking_report_valued_sale_mrp/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===================================
Valued picking linked with MRP Kits
===================================

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

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

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

This module extends the functionality of stock_picking_report_valued
with compatibility of MRP kits. Now we'll be able to correctly summarize
the picking value related to the selled kit with a relations of
components and serials/lots delivered.

**Table of contents**

.. contents::
:local:

Usage
=====

To test this module:

1. Configure some products with traceability and make them kit
components.
2. Sell the kits and go to the stock picking.
3. Print the valued delivery slip:

- The total amount will now be correct.
- The kit components will be summarized in a single kit product line.

Known issues / Roadmap
======================

- Matching sold kits and their delivered components is quite tricky.
This module computes the delivered kit quantity from the delivered
component quantity and the BoM component ratio.
- If the original BoM changes after the sale order is delivered, the
report can lose the exact historical component ratio used at delivery
time.

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

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

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- David Vidal
- Carlos Roca
- Ernesto Tejeda

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-chienandalu| image:: https://github.com/chienandalu.png?size=40px
:target: https://github.com/chienandalu
:alt: chienandalu

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

|maintainer-chienandalu|

This module is part of the `OCA/stock-logistics-reporting <https://github.com/OCA/stock-logistics-reporting/tree/19.0/stock_picking_report_valued_sale_mrp>`_ 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 stock_picking_report_valued_sale_mrp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions stock_picking_report_valued_sale_mrp/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Valued picking linked with MRP Kits",
"summary": "Allow to summarize the picking related with the selled kits",
"version": "19.0.1.0.0",
"development_status": "Beta",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-reporting",
"author": "Tecnativa, Odoo Community Association (OCA)",
"maintainers": ["chienandalu"],
"license": "AGPL-3",
"depends": ["stock_picking_report_valued", "sale_mrp"],
"data": ["report/stock_picking_report_valued.xml"],
"installable": True,
"application": False,
}
47 changes: 47 additions & 0 deletions stock_picking_report_valued_sale_mrp/i18n/it.po
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:
# * stock_picking_report_valued_sale_mrp
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-06-04 10:26+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: stock_picking_report_valued_sale_mrp
#: model_terms:ir.ui.view,arch_db:stock_picking_report_valued_sale_mrp.valued_report_picking_has_serial_move_line
msgid "<span class=\"font-italic\">: </span>"
msgstr "<span class=\"font-italic\">: </span>"

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_delivered_qty
msgid "Phantom Delivered Qty"
msgstr "Q.tà consegna fantasma"

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_line
msgid "Phantom Line"
msgstr "Riga fantasma"

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_product_id
msgid "Product Kit"
msgstr "Kit prodotto"

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model,name:stock_picking_report_valued_sale_mrp.model_stock_move_line
msgid "Product Moves (Stock Move Line)"
msgstr "Movimenti prodotto (riga movimento di magazzino)"

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model,name:stock_picking_report_valued_sale_mrp.model_stock_move
msgid "Stock Move"
msgstr "Movimento di magazzino"
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_report_valued_sale_mrp
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.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: stock_picking_report_valued_sale_mrp
#: model_terms:ir.ui.view,arch_db:stock_picking_report_valued_sale_mrp.valued_report_picking_has_serial_move_line
msgid "<span class=\"font-italic\">: </span>"
msgstr ""

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_delivered_qty
msgid "Phantom Delivered Qty"
msgstr ""

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_line
msgid "Phantom Line"
msgstr ""

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model.fields,field_description:stock_picking_report_valued_sale_mrp.field_stock_move_line__phantom_product_id
msgid "Product Kit"
msgstr ""

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model,name:stock_picking_report_valued_sale_mrp.model_stock_move_line
msgid "Product Moves (Stock Move Line)"
msgstr ""

#. module: stock_picking_report_valued_sale_mrp
#: model:ir.model,name:stock_picking_report_valued_sale_mrp.model_stock_move
msgid "Stock Move"
msgstr ""
2 changes: 2 additions & 0 deletions stock_picking_report_valued_sale_mrp/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import stock_move
from . import stock_move_line
42 changes: 42 additions & 0 deletions stock_picking_report_valued_sale_mrp/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models


class StockMove(models.Model):
_inherit = "stock.move"

def _get_components_per_kit(self):
"""Compute how many kit components were demanded from this line.
We rely on the matching of sale order and pickings demands, but if those
were manually changed, it could lead to inconsistencies"""
self.ensure_one()
result = 0.0
sale_line = self.sale_line_id
if sale_line:
product = sale_line.product_id
bom = (
self.env["mrp.bom"]
._bom_find(
product,
company_id=self.company_id.id,
)
.get(product)
)
if bom and bom.type == "phantom" and sale_line.product_uom_qty:
bom_line = bom.bom_line_ids.filtered(
lambda line: line.product_id == self.product_id
)[:1]
if bom_line:
component_qty = bom_line.product_uom_id._compute_quantity(
bom_line.product_qty,
self.product_uom,
round=False,
)
bom_qty = bom.product_uom_id._compute_quantity(
bom.product_qty,
sale_line.product_uom_id,
round=False,
)
result = component_qty / bom_qty if bom_qty else 0.0
return result
Loading
Loading