Skip to content

Commit

Permalink
Add stock_vertical_lift module
Browse files Browse the repository at this point in the history
  • Loading branch information
guewen authored and hailangvn committed Sep 16, 2021
1 parent bcdef73 commit fc52390
Show file tree
Hide file tree
Showing 31 changed files with 2,396 additions and 0 deletions.
134 changes: 134 additions & 0 deletions stock_vertical_lift/README.rst
@@ -0,0 +1,134 @@
=============
Vertical Lift
=============

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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--warehouse-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_vertical_lift
:alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_vertical_lift
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/153/12.0
:alt: Try me on Runbot

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

Add configuration and dedicated screens to work with Vertical Lift
systems (such as Kardex Remstar, Modula, ...). Drivers for controlling
the lifts physically must be added by additional addons.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/oca_module_lifecycle_development_status.rst>`_

**Table of contents**

.. contents::
:local:

Configuration
=============

General
~~~~~~~

In Inventory Settings, you must have:

* Storage Locations
* Multi-Warehouses
* Multi-Step Routes

Locations
~~~~~~~~~

Additional configuration parameters are added in Locations:

* Sub-locations of a location with the "Is a Vertical Lift View Location"
activated are considered as "Shuttles". A shuttle is a vertical lift shelf.
* Sub-locations of shuttles are considered as "Trays", which is a tier of a
shuttle. When a tray is created, a tray type must be selected. When saved, the
tray location will automatically create as many sub-locations - called
"Cells" - as the tray type contains.
* The tray type of a tray can be changed as long as none of its cell contains
products. When changed, it archives the cells and creates new ones as
configured on the new tray type.

Tray types
~~~~~~~~~~

Tray types can be configured in the Inventory settings.
A tray type defines how much cells a tray can hold. It is a square or rectangle
matrix of n cols * m rows.

Vertical Lift Shuttles
~~~~~~~~~~~~~~~~~~~~~~

The Shuttles are the Vertical Lift Trays. One Shuttle entity has to be created
in Odoo for each physical shuttle. Depending of the subsidiary addons installed
(eg. Kardex), different options may be required (host address, ...). The base
addon only includes shuttles of kind "simulation" which will not send orders to
the hardware.

Known issues / Roadmap
======================

* Extract the tray types and matrix widget in a module, they can be used
alone without vertical lift
* Consider merging the 'vertical_lift_kind' with the kind added by
stock_location_zone
* Complete Pick screen and workflow (currently enough for a demo, not for production)
* Implement Put-away screen and workflow
* Implement Inventory screen and workflow

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/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-warehouse/issues/new?body=module:%20stock_vertical_lift%0Aversion:%2012.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
~~~~~~~~~~~~

* Guewen Baconnier <guewen.baconnier@camptocamp.com>

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-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_vertical_lift>`_ 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_vertical_lift/__init__.py
@@ -0,0 +1 @@
from . import models
34 changes: 34 additions & 0 deletions stock_vertical_lift/__manifest__.py
@@ -0,0 +1,34 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Vertical Lift',
'summary': 'Provides the core for integration with Vertical Lifts',
'version': '12.0.1.0.0',
'category': 'Stock',
'author': 'Camptocamp, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'depends': [
'stock',
'barcodes',
'base_sparse_field',
'stock_location_tray', # OCA/stock-logistics-warehouse
'web_notify', # OCA/web
],
'website': 'https://github.com/OCA/stock-logistics-warehouse',
'demo': [
'demo/stock_location_demo.xml',
'demo/vertical_lift_shuttle_demo.xml',
'demo/product_demo.xml',
'demo/stock_inventory_demo.xml',
'demo/stock_picking_demo.xml',
],
'data': [
'views/stock_location_views.xml',
'views/vertical_lift_shuttle_views.xml',
'views/stock_vertical_lift_templates.xml',
'views/shuttle_screen_templates.xml',
'security/ir.model.access.csv',
],
'installable': True,
'development_status': 'Alpha',
}
32 changes: 32 additions & 0 deletions stock_vertical_lift/demo/product_demo.xml
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="product_running_socks" model="product.product">
<field name="default_code">RS200</field>
<field name="name">Running Socks</field>
<field name="type">product</field>
<field name="categ_id" ref="product.product_category_6"/>
<field name="lst_price">30.0</field>
<field name="standard_price">20.0</field>
<field name="weight">1.0</field>
<field name="tracking">none</field>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="property_stock_inventory" ref="stock.location_inventory"/>
</record>

<record id="product_recovery_socks" model="product.product">
<field name="default_code">RS300</field>
<field name="name">Recovery Socks</field>
<field name="type">product</field>
<field name="categ_id" ref="product.product_category_6"/>
<field name="lst_price">30.0</field>
<field name="standard_price">20.0</field>
<field name="weight">1.0</field>
<field name="tracking">none</field>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<field name="property_stock_inventory" ref="stock.location_inventory"/>
</record>

</odoo>
20 changes: 20 additions & 0 deletions stock_vertical_lift/demo/stock_inventory_demo.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="stock_inventory_vertical_lift_0" model="stock.inventory">
<field name="name">Starting Vertical Lift Inventory</field>
</record>

<record id="stock_inventory_vertical_lift_line_1" model="stock.inventory.line">
<field name="product_id" ref="product_running_socks"/>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_vertical_lift_0"/>
<field name="product_qty">30.0</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_tray_1b_x3y2"/>
</record>

<function model="stock.inventory" name="action_validate">
<function eval="[[('state','=','draft'),('id', '=', ref('stock_vertical_lift.stock_inventory_vertical_lift_0'))]]" model="stock.inventory" name="search"/>
</function>

</odoo>
116 changes: 116 additions & 0 deletions stock_vertical_lift/demo/stock_location_demo.xml
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="stock_location_vertical_lift" model="stock.location">
<field name="name">Vertical Lift</field>
<!-- Beware, must not be view, even if we must not have stock here.
Because stock moves targeting views are not included in the
inventory at date, and we want to be able to use "Vertical Lift View"
as destination (the final destination will be a "cell" in a Shuttle).
-->
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="usage">internal</field>
<field name="vertical_lift_location" eval="True"/>
<field name="company_id"></field>
</record>

<record id="stock_location_vertical_lift_demo_shuttle_1" model="stock.location">
<field name="name">Shuttle 1</field>
<field name="location_id" ref="stock_location_vertical_lift"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_1a" model="stock.location">
<field name="name">Tray 1A</field>
<field name="barcode">T1A</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_1"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_small_8x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_1b" model="stock.location">
<field name="name">Tray 1B</field>
<field name="barcode">T1B</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_1"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_16x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_1c" model="stock.location">
<field name="name">Tray 1C</field>
<field name="barcode">T1C</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_1"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_32x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_shuttle_2" model="stock.location">
<field name="name">Shuttle 2</field>
<field name="location_id" ref="stock_location_vertical_lift"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_2a" model="stock.location">
<field name="name">Tray 2A</field>
<field name="barcode">T2A</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_2"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_8x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_2b" model="stock.location">
<field name="name">Tray 2B</field>
<field name="barcode">T2B</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_2"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_4x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_2c" model="stock.location">
<field name="name">Tray 2C</field>
<field name="barcode">T2C</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_2"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_16x_2"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_2d" model="stock.location">
<field name="name">Tray 2D</field>
<field name="barcode">T2D</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_2"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_small_8x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_shuttle_3" model="stock.location">
<field name="name">Shuttle 3</field>
<field name="location_id" ref="stock_location_vertical_lift"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_3a" model="stock.location">
<field name="name">Tray 3A</field>
<field name="barcode">T3A</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_3"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_small_32x"/>
<field name="usage">internal</field>
</record>

<record id="stock_location_vertical_lift_demo_tray_3b" model="stock.location">
<field name="name">Tray 3B</field>
<field name="barcode">T3B</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_3"/>
<field name="tray_type_id" ref="stock_location_tray.stock_location_tray_type_large_32x"/>
<field name="usage">internal</field>
</record>

<!-- When the trays are created, they will create their 'cell' locations.
This method will add xmlids on them to be able to reference them in
other demo data and tests.
-->
<function model="stock.location" name="_create_tray_xmlids">
<function eval="[[('cell_in_tray_type_id', '!=', False)]]" model="stock.location" name="search"/>
<value>stock_vertical_lift</value>
</function>

</odoo>
30 changes: 30 additions & 0 deletions stock_vertical_lift/demo/stock_picking_demo.xml
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="stock_picking_out_demo_vertical_lift_1" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_out"/>
<field name="origin">Outgoing shipment from Vertical Lift (demo)</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="DateTime.today()"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('stock_vertical_lift.product_running_socks').name,
'product_id': ref('stock_vertical_lift.product_running_socks'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 15.0,
'picking_type_id': ref('stock.picking_type_out'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>

<function model="stock.picking" name="action_confirm">
<value model="stock.picking" eval="[obj().env.ref('stock_vertical_lift.stock_picking_out_demo_vertical_lift_1').id]"/>
</function>

<function model="stock.picking" name="action_assign">
<value model="stock.picking" eval="[obj().env.ref('stock_vertical_lift.stock_picking_out_demo_vertical_lift_1').id]"/>
</function>

</odoo>
22 changes: 22 additions & 0 deletions stock_vertical_lift/demo/vertical_lift_shuttle_demo.xml
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">

<record id="stock_vertical_lift_demo_shuttle_1" model="vertical.lift.shuttle">
<field name="name">Shuttle 1</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_1"/>
<field name="mode">pick</field>
</record>

<record id="stock_vertical_lift_demo_shuttle_2" model="vertical.lift.shuttle">
<field name="name">Shuttle 2</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_2"/>
<field name="mode">pick</field>
</record>

<record id="stock_vertical_lift_demo_shuttle_3" model="vertical.lift.shuttle">
<field name="name">Shuttle 3</field>
<field name="location_id" ref="stock_location_vertical_lift_demo_shuttle_3"/>
<field name="mode">pick</field>
</record>

</odoo>

0 comments on commit fc52390

Please sign in to comment.