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

[15.0][ADD] purchase_mrp_distribution: New module to distribute qty of move in diferent products #1300

Open
wants to merge 1 commit into
base: 15.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
132 changes: 132 additions & 0 deletions purchase_mrp_distribution/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
=========================
Purchase MRP Distribution
=========================

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

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

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

This module allows you to buy a product that will be divided into others without
knowing the exact quantity of the others. That quantity will be filled in the picking.

**Table of contents**

.. contents::
:local:

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

To use this module, we will need to configure n different distribution-type Bills of
Materials (BoM) for n products. To do this, we will follow these steps:

#. Go to Manufacturing > Products > Bills of Materials
#. Click on Create
#. Select the product to be distributed in the receptions
#. Select the BoM type "Distribution"
#. In the components, add the products that can be filled in the reception (it is not
necessary to mark the quantity as it will default to 0)

Usage
=====

To see the module's functionality:

1. Create a new purchase order
2. Add the product for which the BoM has been created
3. Confirm the order
4. Go to the created delivery order
5. You will see a new button in the move that contains the product, click on it
6. A wizard will open to define the quantity of each product to distribute
7. By clicking on Distribute, the move lines will be added with the products from the
BoM

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

#. The current module is not designed to handle multi-step receipts. It operates on a
single-step process, making it unsuitable for more complex inventory management
scenarios.
#. The current module is not designed to handle multiple lots for a product.
#. The current module is not designed to handle multiple packages for a product.

Changelog
=========

This module aims to address the need to receive a generic product, but until the
moment of reception, we do not know the quantity that we might receive of its
specific products.

Using kits was not suitable for us, because to account for a unit of the kit product,
the quantity specified in the BoM must be received. Therefore, we opted to define a
new type of BoM called distribution.

In this way, upon receiving a unit of any product added to the BoM, it will be
accounted for as a unit of the generic product and will be reflected in the svls as
separate products, but they will be accounted for in the purchase line as part of the
product.

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

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

* Tecnaiva

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

* `Tecnativa <https://www.tecnativa.com>`_:

* Pedro M. Baeza
* Carlos Roca

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/manufacture <https://github.com/OCA/manufacture/tree/15.0/purchase_mrp_distribution>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions purchase_mrp_distribution/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
20 changes: 20 additions & 0 deletions purchase_mrp_distribution/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Tecnatva - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Purchase MRP Distribution",
"version": "15.0.1.0.0",
"author": "Tecnaiva, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/manufacture",
"category": "Manufacturing",
"depends": ["purchase_mrp"],
"data": [
"security/ir.model.access.csv",
"views/mrp_bom_views.xml",
"views/stock_picking_views.xml",
"wizards/stock_move_distribution_wiz_views.xml",
],
"license": "AGPL-3",
"installable": True,
"application": False,
}
189 changes: 189 additions & 0 deletions purchase_mrp_distribution/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_mrp_distribution
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-09 09:38+0000\n"
"PO-Revision-Date: 2024-07-09 11:50+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n"

#. module: purchase_mrp_distribution
#: model_terms:ir.ui.view,arch_db:purchase_mrp_distribution.purchase_order_form
msgid ""
"A BoM of type distribution is used to select the quantities of components."
msgstr ""
"Una lista de materiales (BoM) de tipo distribución se utiliza para "
"seleccionar las cantidades de componentes."

#. module: purchase_mrp_distribution
#: model_terms:ir.ui.view,arch_db:purchase_mrp_distribution.purchase_order_form
msgid "At a Stock Transfer."
msgstr "En una transferencia de stock."

#. module: purchase_mrp_distribution
#: model:ir.model,name:purchase_mrp_distribution.model_mrp_bom
msgid "Bill of Material"
msgstr "Lista de material"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_mrp_bom__type
msgid "BoM Type"
msgstr "Tipo de LdM"

#. module: purchase_mrp_distribution
#: model_terms:ir.ui.view,arch_db:purchase_mrp_distribution.stock_move_distribution_wiz_form
msgid "Cancel"
msgstr "Cancelar"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__create_uid
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__create_uid
msgid "Created by"
msgstr "Creado por"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__create_date
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__create_date
msgid "Created on"
msgstr "Creado el"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__demand_quantity
msgid "Demand"
msgstr "Demanda"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__display_name
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__display_name
msgid "Display Name"
msgstr "Nombre a mostrar"

#. module: purchase_mrp_distribution
#: model_terms:ir.ui.view,arch_db:purchase_mrp_distribution.stock_move_distribution_wiz_form
msgid "Distribute"
msgstr "Distribuir"

#. module: purchase_mrp_distribution
#: model:ir.model.fields.selection,name:purchase_mrp_distribution.selection__mrp_bom__type__distribution
msgid "Distribution"
msgstr "Distribución"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move__distribution_bom_id
msgid "Distribution Bom"
msgstr "LdM de distribución"

#. module: purchase_mrp_distribution
#: code:addons/purchase_mrp_distribution/models/stock_move.py:0
#, python-format
msgid "Distribution for %s"
msgstr "Distribución para %s"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__id
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__id
msgid "ID"
msgstr "ID"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz____last_update
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line____last_update
msgid "Last Modified on"
msgstr "Última modificación el"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__write_uid
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__write_uid
msgid "Last Updated by"
msgstr "Última actualización por"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__write_date
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__write_date
msgid "Last Updated on"
msgstr "Última actualización el"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__line_ids
msgid "Line"
msgstr "Linea"

#. module: purchase_mrp_distribution
#: model:ir.model,name:purchase_mrp_distribution.model_stock_move_distribution_wiz_line
msgid "Lines of wizard to distribute product qty to diferent products"
msgstr ""
"Líneas del asistente para distribuir la cantidad del producto a diferentes "
"productos"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__move_id
msgid "Move"
msgstr "Movimiento"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__product_id
msgid "Product"
msgstr "Producto"

#. module: purchase_mrp_distribution
#: model:ir.model,name:purchase_mrp_distribution.model_purchase_order_line
msgid "Purchase Order Line"
msgstr "Línea de pedido de venta"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__quantity
msgid "Quantity"
msgstr "Cantidad"

#. module: purchase_mrp_distribution
#: model:ir.model,name:purchase_mrp_distribution.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de Stock"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,help:purchase_mrp_distribution.field_stock_move_distribution_wiz__demand_quantity
msgid ""
"This is the quantity of products from an inventory point of view. For moves "
"in the state 'done', this is the quantity of products that were actually "
"moved. For other moves, this is the quantity of product that is planned to "
"be moved. Lowering this quantity does not generate a backorder. Changing "
"this quantity on assigned moves affects the product reservation, and should "
"be done with care."
msgstr ""
"Ésta es la cantidad de productos desde un punto de vista de inventario. "
"Para movimientos en el estado 'Realizado', ésta es la cantidad de productos "
"que se movieron realmente. Para otros movimientos, ésta es la cantidad de "
"producto que está planeado mover. Disminuyendo esta cantidad no se genera "
"un pedido en espera. Cambiando esta cantidad en movimientos asignados, "
"afecta la reserva de producto, y debe ser realizado con cuidado."

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz__move_uom_id
msgid "UoM"
msgstr "UdM"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__uom_id
msgid "Uom"
msgstr "UdM"

#. module: purchase_mrp_distribution
#: model:ir.model.fields,field_description:purchase_mrp_distribution.field_stock_move_distribution_wiz_line__wizard_id
msgid "Wizard"
msgstr "Asistente"

#. module: purchase_mrp_distribution
#: model:ir.model,name:purchase_mrp_distribution.model_stock_move_distribution_wiz
msgid "Wizard to distribute product qty to diferent products"
msgstr ""
"Asistente para distribuir la cantidad de producto a diferentes productos"
Loading
Loading