Skip to content

Commit

Permalink
Merge pull request #1595 from OCA/16.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/stock-logistics-warehouse (16.0)
  • Loading branch information
bt-admin authored Jan 2, 2025
2 parents c4b518d + 420509c commit eb7400a
Show file tree
Hide file tree
Showing 46 changed files with 1,384 additions and 82 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ addon | version | maintainers | summary
[stock_inventory_preparation_filter](stock_inventory_preparation_filter/) | 16.0.1.1.0 | | More filters for inventory adjustments
[stock_location_lockdown](stock_location_lockdown/) | 16.0.1.0.1 | | Prevent to add stock on locked locations
[stock_location_package_restriction](stock_location_package_restriction/) | 16.0.1.0.0 | | Control if the location can contain products in a package
[stock_location_pending_move](stock_location_pending_move/) | 16.0.1.0.0 | [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) | This module allows to show pending stock moves (outgoing and incoming) on a stock location
[stock_location_position](stock_location_position/) | 16.0.1.0.0 | | Add coordinate attributes on stock location.
[stock_location_product_restriction](stock_location_product_restriction/) | 16.0.1.1.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) | Prevent to mix different products into the same stock location
[stock_location_zone](stock_location_zone/) | 16.0.1.0.1 | | Classify locations with zones.
[stock_location_product_restriction](stock_location_product_restriction/) | 16.0.1.2.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) | Prevent to mix different products into the same stock location
[stock_location_zone](stock_location_zone/) | 16.0.1.0.2 | | Classify locations with zones.
[stock_move_auto_assign](stock_move_auto_assign/) | 16.0.1.1.1 | | Try to reserve moves when goods enter in a location
[stock_move_auto_assign_auto_release](stock_move_auto_assign_auto_release/) | 16.0.1.1.2 | | Auto release moves after auto assign
[stock_move_common_dest](stock_move_common_dest/) | 16.0.1.0.1 | | Adds field for common destination moves
Expand All @@ -61,7 +62,7 @@ addon | version | maintainers | summary
[stock_picking_show_linked](stock_picking_show_linked/) | 16.0.1.0.0 | | This addon allows to easily access related pickings (in the case of chained routes) through a button in the parent picking view.
[stock_picking_volume](stock_picking_volume/) | 16.0.1.1.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Compute volume information on stock moves and pickings
[stock_picking_volume_packaging](stock_picking_volume_packaging/) | 16.0.1.0.1 | | Use volume information on potential product packaging to compute the volume of a stock.move
[stock_product_qty_by_packaging](stock_product_qty_by_packaging/) | 16.0.1.0.0 | | Compute product quantity to pick by packaging
[stock_product_qty_by_packaging](stock_product_qty_by_packaging/) | 16.0.1.1.0 | | Compute product quantity to pick by packaging
[stock_production_lot_quantity_tree](stock_production_lot_quantity_tree/) | 16.0.1.0.0 | [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) | Allows to display product quantity field on production lot tree view
[stock_pull_list](stock_pull_list/) | 16.0.1.0.0 | [![LoisRForgeFlow](https://github.com/LoisRForgeFlow.png?size=30px)](https://github.com/LoisRForgeFlow) | The pull list checks the stock situation and calculates needed quantities.
[stock_putaway_product_template](stock_putaway_product_template/) | 16.0.1.1.0 | [![kevinkhao](https://github.com/kevinkhao.png?size=30px)](https://github.com/kevinkhao) [![sebastienbeau](https://github.com/sebastienbeau.png?size=30px)](https://github.com/sebastienbeau) | Add product template in putaway strategies from the product view
Expand Down
2 changes: 1 addition & 1 deletion setup/_metapackage/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.0.20241216.0
16.0.20241231.0
1 change: 1 addition & 0 deletions setup/_metapackage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'odoo-addon-stock_inventory_preparation_filter>=16.0dev,<16.1dev',
'odoo-addon-stock_location_lockdown>=16.0dev,<16.1dev',
'odoo-addon-stock_location_package_restriction>=16.0dev,<16.1dev',
'odoo-addon-stock_location_pending_move>=16.0dev,<16.1dev',
'odoo-addon-stock_location_position>=16.0dev,<16.1dev',
'odoo-addon-stock_location_product_restriction>=16.0dev,<16.1dev',
'odoo-addon-stock_location_zone>=16.0dev,<16.1dev',
Expand Down
6 changes: 6 additions & 0 deletions setup/stock_location_pending_move/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
139 changes: 139 additions & 0 deletions stock_location_pending_move/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
===========================
Stock Location Pending Move
===========================

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

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

This module allows to access incoming and ougoing pending moves from a
stock location.

- Stock Location view:

|Pending Moves|

- Detail grouped per origin location:

|Detailed view|

.. |Pending Moves| image:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/16.0/stock_location_pending_move/static/description/pending_moves.png
.. |Detailed view| image:: https://raw.githubusercontent.com/OCA/stock-logistics-warehouse/16.0/stock_location_pending_move/static/description/pending_moves_detail.png

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

When user wants to make a diagnostic on a particular stock location, it
is useful to have pending stock moves that will go in or go out (you can
also go to 'Moves History' but you need to use a filter on stock
location).

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

[ This file is not always required; it should explain **how to configure
the module before using it**; it is aimed at users with administration
privileges.

Please be detailed on the path to configuration (eg: do you need to
activate developer mode?), describe step by step configurations and the
use of screenshots is strongly recommended.]

To configure this module, you need to:

- Go to *App* > Menu > Menu item
- Activate boolean… > save
- …

Usage
=====

- Storage Locations should have been enabled.
- Go to Inventory > Configuration > Warehouse Management > Locations
- Click on 'Pending Move' to see stock moves.
- Click on 'Pending Operations' to see detailed operations.
- By default, the moves are displayed grouped by source location in
order to easy review if there are plenty of moves.

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

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

* ACSONE SA/NV
* BCIM
* Camptocamp

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

- Denis Roussel [email protected]
- Guewen Baconnier
- Akim Juillerat [email protected]
- Alexandre Fayolle [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-rousseldenis| image:: https://github.com/rousseldenis.png?size=40px
:target: https://github.com/rousseldenis
:alt: rousseldenis
.. |maintainer-jbaudoux| image:: https://github.com/jbaudoux.png?size=40px
:target: https://github.com/jbaudoux
:alt: jbaudoux

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

|maintainer-rousseldenis| |maintainer-jbaudoux|

This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/16.0/stock_location_pending_move>`_ 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_location_pending_move/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions stock_location_pending_move/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Stock Location Pending Move",
"summary": """
This module allows to show pending stock moves (outgoing and incoming)
on a stock location""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,BCIM,Camptocamp,Odoo Community Association (OCA)",
"maintainers": ["rousseldenis", "jbaudoux"],
"website": "https://github.com/OCA/stock-logistics-warehouse",
"depends": ["stock"],
"data": ["views/stock_location.xml"],
}
81 changes: 81 additions & 0 deletions stock_location_pending_move/i18n/stock_location_pending_move.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_location_pending_move
#
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_location_pending_move
#: model:ir.model,name:stock_location_pending_move.model_stock_location
msgid "Inventory Locations"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,field_description:stock_location_pending_move.field_stock_location__pending_in_move_ids
msgid "Pending In Move"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,field_description:stock_location_pending_move.field_stock_location__pending_in_move_line_ids
msgid "Pending In Move Line"
msgstr ""

#. module: stock_location_pending_move
#: model_terms:ir.ui.view,arch_db:stock_location_pending_move.stock_location_form_view
msgid "Pending Moves"
msgstr ""

#. module: stock_location_pending_move
#: model_terms:ir.ui.view,arch_db:stock_location_pending_move.stock_location_form_view
msgid "Pending Operations"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,field_description:stock_location_pending_move.field_stock_location__pending_out_move_ids
msgid "Pending Out Move"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,field_description:stock_location_pending_move.field_stock_location__pending_out_move_line_ids
msgid "Pending Out Move Line"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,help:stock_location_pending_move.field_stock_location__pending_in_move_line_ids
msgid ""
"Technical field: the pending incoming stock move lines for the location"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,help:stock_location_pending_move.field_stock_location__pending_in_move_ids
msgid "Technical field: the pending incoming stock moves for the location"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,help:stock_location_pending_move.field_stock_location__pending_out_move_line_ids
msgid ""
"Technical field: the pending outgoing stock move lines for the location"
msgstr ""

#. module: stock_location_pending_move
#: model:ir.model.fields,help:stock_location_pending_move.field_stock_location__pending_out_move_ids
msgid "Technical field: the pending outgoing stock moves for the location"
msgstr ""

#. module: stock_location_pending_move
#: model_terms:ir.ui.view,arch_db:stock_location_pending_move.stock_location_form_view
msgid "These are the pending stock moves."
msgstr ""

#. module: stock_location_pending_move
#: model_terms:ir.ui.view,arch_db:stock_location_pending_move.stock_location_form_view
msgid "These are the pending stock operations."
msgstr ""
1 change: 1 addition & 0 deletions stock_location_pending_move/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_location
106 changes: 106 additions & 0 deletions stock_location_pending_move/models/stock_location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Copyright 2019 Camptocamp SA
# Copyright 2024 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo.tools.safe_eval import safe_eval

PENDING_MOVE_DOMAIN = [
("state", "in", ("waiting", "confirmed", "partially_available", "assigned"))
]


class StockLocation(models.Model):

_inherit = "stock.location"

pending_in_move_ids = fields.One2many(
"stock.move",
"location_dest_id",
domain=PENDING_MOVE_DOMAIN,
help="Technical field: the pending incoming stock moves for the location",
)

pending_in_move_line_ids = fields.One2many(
"stock.move.line",
"location_dest_id",
domain=PENDING_MOVE_DOMAIN,
help="Technical field: the pending incoming "
"stock move lines for the location",
)
pending_out_move_ids = fields.One2many(
"stock.move",
"location_id",
domain=PENDING_MOVE_DOMAIN,
help="Technical field: the pending outgoing stock moves for the location",
)
pending_out_move_line_ids = fields.One2many(
"stock.move.line",
"location_id",
domain=PENDING_MOVE_DOMAIN,
help="Technical field: the pending outgoing "
"stock move lines for the location",
)

def action_show_pending_stock_move_lines(self):
"""
Display all pending stock move lines (outgoing and incoming)
for the location.
"""
self.ensure_one()
action = self.env["ir.actions.act_window"]._for_xml_id(
"stock.stock_move_line_action"
)
# Remove default searches from stock module
context = action.get("context", "{}")
context_dict = safe_eval(context)
if "search_default_done" in context_dict:
context_dict.pop("search_default_done")
context_dict["search_default_todo"] = "1"
context_dict["search_default_by_location"] = True
action["context"] = str(context_dict)
action.update(
{
"domain": [
(
"id",
"in",
(self.pending_out_move_line_ids | self.pending_in_move_line_ids)
.sorted()
.ids,
)
],
}
)
return action

def action_show_pending_stock_moves(self):
"""
Display all pending stock moves (outgoing and incoming)
for the location.
"""
self.ensure_one()
action = self.env["ir.actions.act_window"]._for_xml_id(
"stock.stock_move_action"
)
# Remove default searches from stock module
context = action.get("context", "{}")
context_dict = safe_eval(context)
if "search_default_done" in context_dict:
context_dict.pop("search_default_done")
context_dict["search_default_todo"] = "1"
context_dict["search_default_groupby_location_id"] = True
action["context"] = str(context_dict)
action.update(
{
"domain": [
(
"id",
"in",
(self.pending_in_move_ids | self.pending_out_move_ids)
.sorted()
.ids,
)
],
}
)
return action
Loading

0 comments on commit eb7400a

Please sign in to comment.