Skip to content

Commit

Permalink
[ADD] stock_move_group_by_release_blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
santostelmo committed Jan 27, 2025
1 parent 9756f6d commit 9f11533
Show file tree
Hide file tree
Showing 12 changed files with 602 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/stock_move_group_by_release_blocked/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,
)
75 changes: 75 additions & 0 deletions stock_move_group_by_release_blocked/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
====================================
Stock Move: group by release blocked
====================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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_move_group_by_release_blocked
: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_move_group_by_release_blocked
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/stock-logistics-workflow&target_branch=16.0
:alt: Try me on Runboat

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

Group stock moves in picking depending on the release blocked status of the move.

**Table of contents**

.. contents::
:local:

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_move_group_by_release_blocked%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
~~~~~~~

* Camptocamp

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

* Camptocamp:
* Telmo Santos <[email protected]>
* Sébastien Alix <[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.

This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/16.0/stock_move_group_by_release_blocked>`_ 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_move_group_by_release_blocked/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions stock_move_group_by_release_blocked/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Stock Move: group by release blocked",
"Summary": "Group stock moves in 1 picking based on release blocked",
"version": "16.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
"category": "Warehouse",
"depends": [
"stock_picking_group_by_base",
"stock_available_to_promise_release_block",
],
"installable": True,
"license": "AGPL-3",
"auto_install": True,
}
1 change: 1 addition & 0 deletions stock_move_group_by_release_blocked/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_move
22 changes: 22 additions & 0 deletions stock_move_group_by_release_blocked/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2025 Camptocamp (https://www.camptocamp.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).


from odoo import models
from odoo.osv.expression import AND


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

def _search_picking_for_assignation_domain(self):
return AND(
[
super()._search_picking_for_assignation_domain(),
[("release_blocked", "=", self.release_blocked)],
]
)

def _key_assign_picking(self):
keys = super()._key_assign_picking()
return keys + (self.release_blocked,)
3 changes: 3 additions & 0 deletions stock_move_group_by_release_blocked/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Camptocamp:
* Telmo Santos <[email protected]>
* Sébastien Alix <[email protected]>
1 change: 1 addition & 0 deletions stock_move_group_by_release_blocked/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Group stock moves in picking depending on the release blocked status of the move.
Loading

0 comments on commit 9f11533

Please sign in to comment.