Skip to content
Draft
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
6 changes: 6 additions & 0 deletions setup/stock_move_source_reassign_release_channel/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,
)
108 changes: 108 additions & 0 deletions stock_move_source_reassign_release_channel/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

==========================================
Stock Move Source Reassign Release Channel
==========================================

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

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

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

This module allows to specify a release channel to use when reassigning
movements to a new (or existing picking).

**Table of contents**

.. contents::
:local:

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

When reassigning movements from a stock picking to another, user may
want to mention explicitly the destination release channel.

This in order to help additional manual actions after reassignation.

Usage
=====

- See ``stock_move_source_reassign`` module for configuration.
- Reassign a move or a picking.
- At picking type choice step, you are invited to fill in the
destination release channel.
- Then, the listed pickings will be filtered for that release channel.
If no picking has been chosen (maybe none were available), the newly
created picking will be affected to that release channel.

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

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

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

- Denis Roussel denis.roussel@acsone.eu

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

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

|maintainer-rousseldenis|

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

{
"name": "Stock Move Source Reassign Release Channel",
"summary": """This module allows to choose the release channel where to
reassign the moves""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/wms",
"maintainers": ["rousseldenis"],
"depends": ["stock_move_source_reassign", "stock_release_channel"],
"data": ["wizards/stock_move_reassign.xml"],
}
46 changes: 46 additions & 0 deletions stock_move_source_reassign_release_channel/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_move_source_reassign_release_channel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-22 10:49+0000\n"
"PO-Revision-Date: 2026-07-22 10:49+0000\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_move_source_reassign_release_channel
#: model:ir.model.fields,field_description:stock_move_source_reassign_release_channel.field_stock_move_reassign__release_channel_id
msgid "Release Channel"
msgstr "Canal de Livraison"

#. module: stock_move_source_reassign_release_channel
#: model:ir.model.fields,field_description:stock_move_source_reassign_release_channel.field_stock_move_reassign__release_channel_id_domain
msgid "Release Channel Id Domain"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#: model:ir.model,name:stock_move_source_reassign_release_channel.model_stock_move
msgid "Stock Move"
msgstr "Mouvement de stock"

#. module: stock_move_source_reassign_release_channel
#: model:ir.model,name:stock_move_source_reassign_release_channel.model_stock_move_reassign
msgid "Stock Move Reassign"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#. odoo-python
#: code:addons/stock_move_source_reassign_release_channel/wizards/stock_move_reassign.py:0
#, python-format
msgid ""
"You cannot use the release channel %(name)s as it is not in a correct state!"
msgstr ""
"Vous ne pouvez pas utiliser le canal de livraison %(name)s car il n'est pas dans un"
"état correct!"
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_move_source_reassign_release_channel
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-22 10:49+0000\n"
"PO-Revision-Date: 2026-07-22 10:49+0000\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_move_source_reassign_release_channel
#: model:ir.model.fields,field_description:stock_move_source_reassign_release_channel.field_stock_move_reassign__release_channel_id
msgid "Release Channel"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#: model:ir.model.fields,field_description:stock_move_source_reassign_release_channel.field_stock_move_reassign__release_channel_id_domain
msgid "Release Channel Id Domain"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#: model:ir.model,name:stock_move_source_reassign_release_channel.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#: model:ir.model,name:stock_move_source_reassign_release_channel.model_stock_move_reassign
msgid "Stock Move Reassign"
msgstr ""

#. module: stock_move_source_reassign_release_channel
#. odoo-python
#: code:addons/stock_move_source_reassign_release_channel/wizards/stock_move_reassign.py:0
#, python-format
msgid ""
"You cannot use the release channel %(name)s as it is not in a correct state!"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_move
71 changes: 71 additions & 0 deletions stock_move_source_reassign_release_channel/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright 2026 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.osv.expression import AND


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

def _search_picking_for_assignation_domain(self):
"""
If there was a release channel filled in in the reassignation
wizard, we will try to reassign the move to a picking with
the same release channel first.
"""
domain = super()._search_picking_for_assignation_domain()
reassign_release_channel_id = self.env.context.get(
"reassign_release_channel_id"
)
if reassign_release_channel_id:
domain = AND(
[
domain,
[("release_channel_id", "=", reassign_release_channel_id)],
]
)
return domain

def _get_new_picking_values(self):
"""
A release channel has been filled in in the reassignation wizard.
If a new picking is created, fill in the release channel in new values.
"""
values = super()._get_new_picking_values()
reassign_release_channel_id = self.env.context.get(
"reassign_release_channel_id"
)
if reassign_release_channel_id:
values["release_channel_id"] = reassign_release_channel_id
return values

def _source_reassign(
self,
destination_picking_type,
transfer_picking_type,
destination_picking=False,
strict=True,
**kwargs,
):
if "reassign_release_channel_id" in kwargs:
return super(
StockMove,
self.with_context(
reassign_release_channel_id=kwargs.get(
"reassign_release_channel_id"
)
),
)._source_reassign(
destination_picking_type,
transfer_picking_type,
destination_picking=destination_picking,
strict=strict,
**kwargs,
)
return super()._source_reassign(
destination_picking_type,
transfer_picking_type,
destination_picking=destination_picking,
strict=strict,
**kwargs,
)
4 changes: 4 additions & 0 deletions stock_move_source_reassign_release_channel/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
When reassigning movements from a stock picking to another, user may
want to mention explicitly the destination release channel.

This in order to help additional manual actions after reassignation.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Denis Roussel <denis.roussel@acsone.eu>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows to specify a release channel to use when reassigning
movements to a new (or existing picking).
7 changes: 7 additions & 0 deletions stock_move_source_reassign_release_channel/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- See `stock_move_source_reassign` module for configuration.
- Reassign a move or a picking.
- At picking type choice step, you are invited to fill in the destination release
channel.
- Then, the listed pickings will be filtered for that release channel. If no picking
has been chosen (maybe none were available), the newly created picking will be
affected to that release channel.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading