-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] - add stock_release_channel_shipment_advice_toursolver
Use TourSolver to plan shipment advices for ready and released pickings.
- Loading branch information
Showing
19 changed files
with
856 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...l_shipment_advice_toursolver/odoo/addons/stock_release_channel_shipment_advice_toursolver
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_release_channel_shipment_advice_toursolver |
6 changes: 6 additions & 0 deletions
6
setup/stock_release_channel_shipment_advice_toursolver/setup.py
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, | ||
) |
74 changes: 74 additions & 0 deletions
74
stock_release_channel_shipment_advice_toursolver/README.rst
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,74 @@ | ||
================================================ | ||
Stock Release Channel Shipment Advice Toursolver | ||
================================================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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%2Fwms-lightgray.png?logo=github | ||
:target: https://github.com/OCA/wms/tree/16.0/stock_release_channel_shipment_advice_toursolver | ||
: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_release_channel_shipment_advice_toursolver | ||
: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/wms&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
Use TourSolver to plan shipment advices for ready and released pickings. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
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 smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/wms/issues/new?body=module:%20stock_release_channel_shipment_advice_toursolver%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 | ||
~~~~~~~~~~~~ | ||
|
||
* Laurent Mignon <[email protected]> | ||
* Souheil Bejaoui <[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/wms <https://github.com/OCA/wms/tree/16.0/stock_release_channel_shipment_advice_toursolver>`_ 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,2 @@ | ||
from . import models | ||
from . import wizards |
18 changes: 18 additions & 0 deletions
18
stock_release_channel_shipment_advice_toursolver/__manifest__.py
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,18 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Stock Release Channel Shipment Advice Toursolver", | ||
"summary": """ | ||
Use TourSolver to plan shipment advices for ready and released pickings""", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "ACSONE SA/NV,Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/wms", | ||
"depends": [ | ||
"stock_release_channel_shipment_advice", | ||
"shipment_advice_planner_toursolver", | ||
], | ||
"data": ["views/toursolver_task.xml", "views/stock_release_channel.xml"], | ||
"demo": [], | ||
} |
2 changes: 2 additions & 0 deletions
2
stock_release_channel_shipment_advice_toursolver/models/__init__.py
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,2 @@ | ||
from . import stock_release_channel | ||
from . import toursolver_task |
25 changes: 25 additions & 0 deletions
25
stock_release_channel_shipment_advice_toursolver/models/stock_release_channel.py
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,25 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class StockReleaseChannel(models.Model): | ||
|
||
_inherit = "stock.release.channel" | ||
|
||
shipment_planning_method = fields.Selection( | ||
selection_add=[("toursolver", "TourSolver")], | ||
ondelete={"toursolver": "cascade"}, | ||
) | ||
delivery_resource_ids = fields.Many2many( | ||
comodel_name="toursolver.resource", | ||
string="Delivery resources", | ||
help="delivery resources to be considered in geo-optimazation", | ||
) | ||
|
||
def _get_new_planner(self): | ||
self.ensure_one() | ||
planner = super()._get_new_planner() | ||
planner.delivery_resource_ids = self.delivery_resource_ids | ||
return planner |
19 changes: 19 additions & 0 deletions
19
stock_release_channel_shipment_advice_toursolver/models/toursolver_task.py
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,19 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ToursolverTask(models.Model): | ||
|
||
_inherit = "toursolver.task" | ||
|
||
release_channel_id = fields.Many2one( | ||
comodel_name="stock.release.channel", string="Release Channel", readonly=True | ||
) | ||
|
||
def _get_new_shipment_advice_planer(self, resource, pickings_to_plan): | ||
planner = super()._get_new_shipment_advice_planer(resource, pickings_to_plan) | ||
planner.release_channel_id = self.release_channel_id | ||
planner.picking_to_plan_ids = pickings_to_plan | ||
return planner |
2 changes: 2 additions & 0 deletions
2
stock_release_channel_shipment_advice_toursolver/readme/CONTRIBUTORS.rst
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,2 @@ | ||
* Laurent Mignon <[email protected]> | ||
* Souheil Bejaoui <[email protected]> |
1 change: 1 addition & 0 deletions
1
stock_release_channel_shipment_advice_toursolver/readme/DESCRIPTION.rst
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 @@ | ||
Use TourSolver to plan shipment advices for ready and released pickings. |
Binary file added
BIN
+9.23 KB
stock_release_channel_shipment_advice_toursolver/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.