Skip to content

Commit

Permalink
Add. Community module to filter only lots available in source locatio…
Browse files Browse the repository at this point in the history
…n while internal transfer (#138)
  • Loading branch information
mohan-13 authored Apr 3, 2024
1 parent b6b14d3 commit 9ee6add
Show file tree
Hide file tree
Showing 16 changed files with 761 additions and 0 deletions.
90 changes: 90 additions & 0 deletions community_modules/stock_picking_filter_lot/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
========================
Stock picking filter lot
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e7671ecd06d80ad05c3b4eb51f9bdb2ade55727be790dadd20e236e1496f4b96
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fstock--logistics--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_filter_lot
:alt: OCA/stock-logistics-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-16-0/stock-logistics-workflow-16-0-stock_picking_filter_lot
: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-workflow&target_branch=16.0
:alt: Try me on Runboat

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

This module extends the functionality of stock: in a picking out or a scrap the user
can only select the lots available in the origin location.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module:

#. Go to an open picking or a scrap with products that are tracked by lots.
#. When you enter detailed operations you will notice that the lots available
to select are filtered by the origin of the operation.

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

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

* Agile Business Group

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

* Simone Rubino <simone.rubino@agilebg.com> (www.agilebg.com)
* Lois Rilo <lois.rilo@forgeflow.com> (www.forgeflow.com)
* Alan Ramos <alan.ramos@jarsa.com.mx> (www.jarsa.com.mx)
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th> (www.ecosoft.co.th)
* Jesus Alcala <jesus.alcala@jarsa.com.mx> (www.jarsa.com.mx)

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/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_picking_filter_lot>`_ 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 community_modules/stock_picking_filter_lot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions community_modules/stock_picking_filter_lot/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock picking filter lot",
"summary": "In picking out lots' selection, filter lots based on their location",
"version": "16.0.1.0.0",
"category": "Warehouse",
"website": "https://github.com/OCA/stock-logistics-workflow",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["stock"],
"data": ["views/stock_move_line_view.xml", "views/stock_scrap_view.xml"],
}
27 changes: 27 additions & 0 deletions community_modules/stock_picking_filter_lot/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_filter_lot
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-02-12 22:33+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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 4.17\n"

#. module: stock_picking_filter_lot
#: model:ir.model.fields,field_description:stock_picking_filter_lot.field_stock_lot__location_ids
msgid "Location"
msgstr "Ubicación"

#. module: stock_picking_filter_lot
#: model:ir.model,name:stock_picking_filter_lot.model_stock_lot
msgid "Lot/Serial"
msgstr "Lote/Serie"
27 changes: 27 additions & 0 deletions community_modules/stock_picking_filter_lot/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_filter_lot
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-03-13 13:34+0000\n"
"Last-Translator: MorganeGoujon <morgane@scalizer.fr>\n"
"Language-Team: none\n"
"Language: fr\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 4.17\n"

#. module: stock_picking_filter_lot
#: model:ir.model.fields,field_description:stock_picking_filter_lot.field_stock_lot__location_ids
msgid "Location"
msgstr "Emplacement"

#. module: stock_picking_filter_lot
#: model:ir.model,name:stock_picking_filter_lot.model_stock_lot
msgid "Lot/Serial"
msgstr "Lot/numéro de série"
34 changes: 34 additions & 0 deletions community_modules/stock_picking_filter_lot/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:
# * stock_picking_filter_lot
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 11:57+0000\n"
"PO-Revision-Date: 2023-11-17 09:33+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: \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 4.17\n"

#. module: stock_picking_filter_lot
#: model:ir.model.fields,field_description:stock_picking_filter_lot.field_stock_lot__location_ids
msgid "Location"
msgstr "Ubicazione"

#. module: stock_picking_filter_lot
#: model:ir.model,name:stock_picking_filter_lot.model_stock_lot
msgid "Lot/Serial"
msgstr "Lotto/seriale"

#~ msgid "Filter location id"
#~ msgstr "Filtra per punto di stoccaggio"

#~ msgid "Packing Operation"
#~ msgstr "Impacchettamento"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_filter_lot
#
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: stock_picking_filter_lot
#: model:ir.model.fields,field_description:stock_picking_filter_lot.field_stock_lot__location_ids
msgid "Location"
msgstr ""

#. module: stock_picking_filter_lot
#: model:ir.model,name:stock_picking_filter_lot.model_stock_lot
msgid "Lot/Serial"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_production_lot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class StockProductionLot(models.Model):
_inherit = "stock.lot"

location_ids = fields.Many2many(
comodel_name="stock.location", compute="_compute_location_ids", store=True
)

@api.depends("quant_ids", "quant_ids.location_id", "quant_ids.quantity")
def _compute_location_ids(self):
for lot in self:
lot.location_ids = lot.quant_ids.filtered(lambda l: l.quantity > 0).mapped(
"location_id"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* Simone Rubino <simone.rubino@agilebg.com> (www.agilebg.com)
* Lois Rilo <lois.rilo@forgeflow.com> (www.forgeflow.com)
* Alan Ramos <alan.ramos@jarsa.com.mx> (www.jarsa.com.mx)
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th> (www.ecosoft.co.th)
* Jesus Alcala <jesus.alcala@jarsa.com.mx> (www.jarsa.com.mx)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends the functionality of stock: in a picking out or a scrap the user
can only select the lots available in the origin location.
5 changes: 5 additions & 0 deletions community_modules/stock_picking_filter_lot/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
To use this module:

#. Go to an open picking or a scrap with products that are tracked by lots.
#. When you enter detailed operations you will notice that the lots available
to select are filtered by the origin of the operation.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9ee6add

Please sign in to comment.