forked from OCA/stock-logistics-warehouse
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1595 from OCA/16.0
Syncing from upstream OCA/stock-logistics-warehouse (16.0)
- Loading branch information
Showing
46 changed files
with
1,384 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
16.0.20241216.0 | ||
16.0.20241231.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
setup/stock_location_pending_move/odoo/addons/stock_location_pending_move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_location_pending_move |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
81
stock_location_pending_move/i18n/stock_location_pending_move.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import stock_location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.