diff --git a/setup/stock_vertical_lift_qty_by_packaging/odoo/addons/stock_vertical_lift_qty_by_packaging b/setup/stock_vertical_lift_qty_by_packaging/odoo/addons/stock_vertical_lift_qty_by_packaging new file mode 120000 index 000000000..9493f2eac --- /dev/null +++ b/setup/stock_vertical_lift_qty_by_packaging/odoo/addons/stock_vertical_lift_qty_by_packaging @@ -0,0 +1 @@ +../../../../stock_vertical_lift_qty_by_packaging \ No newline at end of file diff --git a/setup/stock_vertical_lift_qty_by_packaging/setup.py b/setup/stock_vertical_lift_qty_by_packaging/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/stock_vertical_lift_qty_by_packaging/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_vertical_lift_qty_by_packaging/README.rst b/stock_vertical_lift_qty_by_packaging/README.rst new file mode 100644 index 000000000..8a6f822b5 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/README.rst @@ -0,0 +1,86 @@ +==================================== +Stock vertical lift qty by packaging +==================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-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/14.0/stock_vertical_lift_qty_by_packaging + :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-14-0/stock-logistics-warehouse-14-0-stock_vertical_lift_qty_by_packaging + :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/14.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Glue module for `stock_product_qty_by_packaging` and `stock_vertical_lift`. + +.. 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 `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +Simone Orsi +Sébastien Alix +`Trobz `_: +* Nguyen Hoang Hiep + +Other credits +~~~~~~~~~~~~~ + +The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_vertical_lift_qty_by_packaging/__init__.py b/stock_vertical_lift_qty_by_packaging/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_vertical_lift_qty_by_packaging/__manifest__.py b/stock_vertical_lift_qty_by_packaging/__manifest__.py new file mode 100644 index 000000000..62cbf4b67 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2021 Camptocamp SA +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl) +{ + "name": "Stock vertical lift qty by packaging", + "summary": """ + Glue module for `stock_product_qty_by_packaging` and `stock_vertical_lift`. + """, + "version": "14.0.1.0.0", + "development_status": "Alpha", + "category": "Warehouse Management", + "website": "https://github.com/OCA/stock-logistics-warehouse", + "author": "Camptocamp, Odoo Community Association (OCA)", + "license": "LGPL-3", + "application": False, + "installable": True, + "auto_install": True, + "depends": ["stock_product_qty_by_packaging", "stock_vertical_lift"], + "data": ["views/vertical_lift_operation_base_views.xml"], +} diff --git a/stock_vertical_lift_qty_by_packaging/i18n/stock_vertical_lift_qty_by_packaging.pot b/stock_vertical_lift_qty_by_packaging/i18n/stock_vertical_lift_qty_by_packaging.pot new file mode 100644 index 000000000..823c7f4b2 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/i18n/stock_vertical_lift_qty_by_packaging.pot @@ -0,0 +1,26 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_vertical_lift_qty_by_packaging +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \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_vertical_lift_qty_by_packaging +#: model:ir.model.fields,field_description:stock_vertical_lift_qty_by_packaging.field_vertical_lift_operation_pick__product_qty_by_packaging_display +#: model:ir.model.fields,field_description:stock_vertical_lift_qty_by_packaging.field_vertical_lift_operation_put__product_qty_by_packaging_display +#: model:ir.model.fields,field_description:stock_vertical_lift_qty_by_packaging.field_vertical_lift_operation_transfer__product_qty_by_packaging_display +msgid "Product Qty By Packaging Display" +msgstr "" + +#. module: stock_vertical_lift_qty_by_packaging +#: model:ir.model,name:stock_vertical_lift_qty_by_packaging.model_vertical_lift_operation_transfer +msgid "Vertical Lift Operation - Transfer" +msgstr "" diff --git a/stock_vertical_lift_qty_by_packaging/models/__init__.py b/stock_vertical_lift_qty_by_packaging/models/__init__.py new file mode 100644 index 000000000..aa18eecec --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/models/__init__.py @@ -0,0 +1 @@ +from . import vertical_lift_operation_base diff --git a/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py b/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py new file mode 100644 index 000000000..2fc36e228 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/models/vertical_lift_operation_base.py @@ -0,0 +1,22 @@ +# Copyright 2020 Camptocamp SA +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). + +from odoo import api, fields, models + + +class VerticalLiftOperationTransfer(models.AbstractModel): + _inherit = "vertical.lift.operation.transfer" + + product_qty_by_packaging_display = fields.Char( + compute="_compute_product_qty_by_packaging_display" + ) + + @api.depends("current_move_line_id.product_qty") + def _compute_product_qty_by_packaging_display(self): + # Seems the ctx key is not propagated on a related field + # nor from the field definition, nor from the field declaration in the view. + # Hence, we are forced to use a computed field. + for rec in self.with_context(qty_by_pkg_total_units=True): + rec.product_qty_by_packaging_display = ( + rec.current_move_line_id.product_qty_by_packaging_display + ) diff --git a/stock_vertical_lift_qty_by_packaging/readme/CONTRIBUTORS.rst b/stock_vertical_lift_qty_by_packaging/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..1c1072fd9 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +Simone Orsi +Sébastien Alix +`Trobz `_: +* Nguyen Hoang Hiep diff --git a/stock_vertical_lift_qty_by_packaging/readme/CREDITS.rst b/stock_vertical_lift_qty_by_packaging/readme/CREDITS.rst new file mode 100644 index 000000000..f37ebe757 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/readme/CREDITS.rst @@ -0,0 +1 @@ +The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp diff --git a/stock_vertical_lift_qty_by_packaging/readme/DESCRIPTION.rst b/stock_vertical_lift_qty_by_packaging/readme/DESCRIPTION.rst new file mode 100644 index 000000000..c35e9baf4 --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Glue module for `stock_product_qty_by_packaging` and `stock_vertical_lift`. diff --git a/stock_vertical_lift_qty_by_packaging/static/description/icon.png b/stock_vertical_lift_qty_by_packaging/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_vertical_lift_qty_by_packaging/static/description/icon.png differ diff --git a/stock_vertical_lift_qty_by_packaging/static/description/index.html b/stock_vertical_lift_qty_by_packaging/static/description/index.html new file mode 100644 index 000000000..52a9caabd --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/static/description/index.html @@ -0,0 +1,431 @@ + + + + + + +Stock vertical lift qty by packaging + + + +
+

Stock vertical lift qty by packaging

+ + +

Alpha License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

+

Glue module for stock_product_qty_by_packaging and stock_vertical_lift.

+
+

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

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+

Simone Orsi <simone.orsi@camptocamp.com> +Sébastien Alix <sebastien.alix@camptocamp.com> +Trobz: +* Nguyen Hoang Hiep <hiepnh@trobz.com>

+
+
+

Other credits

+

The migration of this module from 13.0 to 14.0 was financially supported by Camptocamp

+
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/stock_vertical_lift_qty_by_packaging/views/vertical_lift_operation_base_views.xml b/stock_vertical_lift_qty_by_packaging/views/vertical_lift_operation_base_views.xml new file mode 100644 index 000000000..5ffb088fb --- /dev/null +++ b/stock_vertical_lift_qty_by_packaging/views/vertical_lift_operation_base_views.xml @@ -0,0 +1,26 @@ + + + + vertical.lift.operation.transfer.screen.view + vertical.lift.operation.transfer + + + + + 1 + + + 1 + + + + + + +