Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][ADD] stock_release_channel_plan_process_end_time #696

Merged
Merged
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_release_channel_plan_process_end_time/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,
)
38 changes: 38 additions & 0 deletions stock_release_channel_plan/tests/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests.common import TransactionCase


class ReleaseChannelPlanCase(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.plan1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_preparation_plan_demo_mon"
)
cls.plan1_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_mon_thu1"
)
cls.plan1_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_mon_thu2"
)
cls.plan2_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_tue_fri1"
)
cls.plan2_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_tue_fri2"
)
cls.plan3_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_wed1"
)
cls.plan3_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_wed2"
)

def _launch_channel(self, preparation_plan):
self.env["stock.release.channel.plan.wizard.launch"].create(
{
"preparation_plan_id": preparation_plan.id,
}
).action_launch()
Original file line number Diff line number Diff line change
@@ -1,42 +1,10 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests.common import TransactionCase
from .common import ReleaseChannelPlanCase


class TestStockReleaseChannelPlan(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.plan1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_preparation_plan_demo_mon"
)
cls.plan1_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_mon_thu1"
)
cls.plan1_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_mon_thu2"
)
cls.plan2_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_tue_fri1"
)
cls.plan2_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_tue_fri2"
)
cls.plan3_channel1 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_wed1"
)
cls.plan3_channel2 = cls.env.ref(
"stock_release_channel_plan.stock_release_channel_wed2"
)

def _launch_channel(self, preparation_plan):
self.env["stock.release.channel.plan.wizard.launch"].create(
{
"preparation_plan_id": preparation_plan.id,
}
).action_launch()

class TestStockReleaseChannelPlan(ReleaseChannelPlanCase):
def test_launch_plan(self):
"""Test launching plan1"""
self.plan1_channel1.write({"state": "locked"})
Expand Down
93 changes: 93 additions & 0 deletions stock_release_channel_plan_process_end_time/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
===========================================
Stock Release Channel Plan Process End Time
===========================================

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

.. |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_plan_process_end_time
: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_plan_process_end_time
: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|

At launching a plan, a process end date is set on each release channel of the
plan. It is then up to you to process the content of the release channel and at
then end, close it and make it asleep.

**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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/wms/issues/new?body=module:%20stock_release_channel_plan_process_end_time%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
~~~~~~~

* BCIM

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

* Jacques-Etienne Baudoux <je@bcim.be>

Other credits
~~~~~~~~~~~~~

**Financial support**

* Alcyon Belux

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-jbaudoux| image:: https://github.com/jbaudoux.png?size=40px
:target: https://github.com/jbaudoux
:alt: jbaudoux

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

|maintainer-jbaudoux|

This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/16.0/stock_release_channel_plan_process_end_time>`_ 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_release_channel_plan_process_end_time/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import wizards
24 changes: 24 additions & 0 deletions stock_release_channel_plan_process_end_time/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Stock Release Channel Plan Process End Time",
"summary": "Glue module between release channel plan and process end time",
"version": "16.0.1.0.0",
"development_status": "Beta",
"license": "AGPL-3",
"author": "BCIM,Odoo Community Association (OCA)",
"maintainers": ["jbaudoux"],
"website": "https://github.com/OCA/wms",
"depends": [
"stock_release_channel_plan",
"stock_release_channel_process_end_time",
],
"data": [
"wizards/launch_plan.xml",
],
"demo": [
"demo/stock_release_channel.xml",
],
"auto_install": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2023 Jacques-Etienne Baudoux (BCIM) <je@bcim.be>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">

<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_mon_thu1"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">10.0</field>
</record>
<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_mon_thu2"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">14.0</field>
</record>
<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_tue_fri1"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">10.0</field>
</record>
<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_tue_fri2"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">14.0</field>
</record>
<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_wed1"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">10.0</field>
</record>
<record
model="stock.release.channel"
id="stock_release_channel_plan.stock_release_channel_wed2"
>
<field name="warehouse_id" ref="stock.warehouse0" />
<field name="process_end_time">14.0</field>
</record>

</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Jacques-Etienne Baudoux <je@bcim.be>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Financial support**

* Alcyon Belux
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
At launching a plan, a process end date is set on each release channel of the
plan. It is then up to you to process the content of the release channel and at
then end, close it and make it asleep.
Loading
Loading