Skip to content

Commit

Permalink
[ADD] stock_release_channel_show_volume
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Tietz (MT Software) <[email protected]>
  • Loading branch information
jbaudoux and mt-software-de committed Feb 24, 2024
1 parent 97707e6 commit f7f194e
Show file tree
Hide file tree
Showing 13 changed files with 907 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/stock_release_channel_show_volume/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,
)
78 changes: 78 additions & 0 deletions stock_release_channel_show_volume/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
===================================
Stock Release Channels show Volumes
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:6d21986b669c172ec403d968cfeaf164789c75dc3e6e73553e2f49dd5c1ca26d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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_show_volume
: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_show_volume
: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|

Show the volume on the release channels

**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_show_volume%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
~~~~~~~

* MT-Software
* BCIM

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

* Michael Tietz (MT Software) <[email protected]>
* Jacques-Etienne Baudoux (BCIM) <[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_show_volume>`_ 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_show_volume/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions stock_release_channel_show_volume/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

{
"name": "Stock Release Channels show Volumes",
"summary": "Displays volumes of stock release channels",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "MT-Software, BCIM, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/wms",
"depends": [
"stock_picking_volume",
"stock_release_channel",
],
"data": [
"views/release_channel.xml",
],
"installable": True,
}
1 change: 1 addition & 0 deletions stock_release_channel_show_volume/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_release_channel
119 changes: 119 additions & 0 deletions stock_release_channel_show_volume/models/stock_release_channel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Copyright 2023 Michael Tietz (MT Software) <[email protected]>
# Copyright 2023 Jacques-Etienne Baudoux (BCIM) <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)

from odoo import api, fields, models


class StockReleaseChannel(models.Model):
_inherit = "stock.release.channel"

volume_picking_all = fields.Float(
string="All Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_release_ready = fields.Float(
string="Release Ready Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_released = fields.Float(
string="Released Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_assigned = fields.Float(
string="Available Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_waiting = fields.Float(
string="Waiting Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_late = fields.Float(
string="Late Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_priority = fields.Float(
string="Priority Transfers Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_done = fields.Float(
string="Transfers Done VolumeToday",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_picking_full_progress = fields.Float(
string="Full Progress Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_all = fields.Float(
string="All Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_release_ready = fields.Float(
string="Release Ready Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_released = fields.Float(
string="Released Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_assigned = fields.Float(
string="Available Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_waiting = fields.Float(
string="Waiting Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_late = fields.Float(
string="Late Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_priority = fields.Float(
string="Priority Moves (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)
volume_move_done = fields.Float(
string="Moves Done Today (Estimate) Volume",
compute="_compute_picking_count",
digits="Release Channel Volume",
)

@api.model
def _get_picking_read_group_fields(self):
res = super()._get_picking_read_group_fields()
res += ["volume"]
return res

@api.model
def _get_move_read_group_fields(self):
res = super()._get_move_read_group_fields()
res += ["volume"]
return res

@api.model
def _get_picking_compute_fields(self):
res = super()._get_picking_compute_fields()
res += [("volume", "volume")]
return res

@api.model
def _get_move_compute_fields(self):
res = super()._get_move_compute_fields()
res += [("volume", "volume")]
return res
2 changes: 2 additions & 0 deletions stock_release_channel_show_volume/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Michael Tietz (MT Software) <[email protected]>
* Jacques-Etienne Baudoux (BCIM) <[email protected]>
1 change: 1 addition & 0 deletions stock_release_channel_show_volume/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show the volume on the release channels
Loading

0 comments on commit f7f194e

Please sign in to comment.