From f93defdb3adcd1dcfe33a265324804a797eb41e2 Mon Sep 17 00:00:00 2001 From: Yoshi Tashiro Date: Sun, 19 Mar 2023 15:08:39 +0000 Subject: [PATCH] rename module, various improvements --- .../odoo/addons/stock_product_shelfinfo | 1 + setup/stock_product_shelfinfo/setup.py | 6 + .../README.rst | 35 ++-- .../__init__.py | 0 stock_product_shelfinfo/__manifest__.py | 20 +++ stock_product_shelfinfo/i18n/ja.po | 163 ++++++++++++++++++ stock_product_shelfinfo/models/__init__.py | 4 + .../models/product_product.py | 14 ++ .../models/product_shelfinfo.py | 67 +++++++ .../models/product_template.py | 14 ++ stock_product_shelfinfo/models/stock_move.py | 34 ++++ .../readme/DESCRIPTION.rst | 3 + stock_product_shelfinfo/readme/USAGE.rst | 7 + .../report_stockpicking_operations.xml | 15 ++ .../security/ir.model.access.csv | 3 + .../security/product_shelfinfo_security.xml | 10 ++ .../static/description/index.html | 45 +++-- .../views/product_shelfinfo_views.xml | 98 +++++++++++ .../views/product_template_views.xml | 38 ++++ .../views/stock_picking_views.xml | 25 +++ stock_storage/__manifest__.py | 19 -- stock_storage/i18n/ja.po | 0 stock_storage/models/__init__.py | 4 - stock_storage/models/product_product.py | 10 -- stock_storage/models/product_template.py | 10 -- stock_storage/models/stock_move.py | 20 --- stock_storage/models/stock_move_line.py | 20 --- stock_storage/models/stock_storage.py | 25 --- stock_storage/readme/DESCRIPTION.rst | 3 - stock_storage/security/ir.model.access.csv | 3 - stock_storage/views/product_product_views.xml | 3 - .../views/product_template_views.xml | 15 -- stock_storage/views/stock_move_line_views.xml | 15 -- stock_storage/views/stock_move_views.xml | 15 -- stock_storage/views/stock_storage_views.xml | 33 ---- 35 files changed, 572 insertions(+), 225 deletions(-) create mode 120000 setup/stock_product_shelfinfo/odoo/addons/stock_product_shelfinfo create mode 100644 setup/stock_product_shelfinfo/setup.py rename {stock_storage => stock_product_shelfinfo}/README.rst (52%) rename {stock_storage => stock_product_shelfinfo}/__init__.py (100%) create mode 100644 stock_product_shelfinfo/__manifest__.py create mode 100644 stock_product_shelfinfo/i18n/ja.po create mode 100644 stock_product_shelfinfo/models/__init__.py create mode 100644 stock_product_shelfinfo/models/product_product.py create mode 100644 stock_product_shelfinfo/models/product_shelfinfo.py create mode 100644 stock_product_shelfinfo/models/product_template.py create mode 100644 stock_product_shelfinfo/models/stock_move.py create mode 100644 stock_product_shelfinfo/readme/DESCRIPTION.rst create mode 100644 stock_product_shelfinfo/readme/USAGE.rst create mode 100644 stock_product_shelfinfo/reports/report_stockpicking_operations.xml create mode 100644 stock_product_shelfinfo/security/ir.model.access.csv create mode 100644 stock_product_shelfinfo/security/product_shelfinfo_security.xml rename {stock_storage => stock_product_shelfinfo}/static/description/index.html (80%) create mode 100644 stock_product_shelfinfo/views/product_shelfinfo_views.xml create mode 100644 stock_product_shelfinfo/views/product_template_views.xml create mode 100644 stock_product_shelfinfo/views/stock_picking_views.xml delete mode 100644 stock_storage/__manifest__.py delete mode 100644 stock_storage/i18n/ja.po delete mode 100644 stock_storage/models/__init__.py delete mode 100644 stock_storage/models/product_product.py delete mode 100644 stock_storage/models/product_template.py delete mode 100644 stock_storage/models/stock_move.py delete mode 100644 stock_storage/models/stock_move_line.py delete mode 100644 stock_storage/models/stock_storage.py delete mode 100644 stock_storage/readme/DESCRIPTION.rst delete mode 100644 stock_storage/security/ir.model.access.csv delete mode 100644 stock_storage/views/product_product_views.xml delete mode 100644 stock_storage/views/product_template_views.xml delete mode 100644 stock_storage/views/stock_move_line_views.xml delete mode 100644 stock_storage/views/stock_move_views.xml delete mode 100644 stock_storage/views/stock_storage_views.xml diff --git a/setup/stock_product_shelfinfo/odoo/addons/stock_product_shelfinfo b/setup/stock_product_shelfinfo/odoo/addons/stock_product_shelfinfo new file mode 120000 index 00000000..3a72f007 --- /dev/null +++ b/setup/stock_product_shelfinfo/odoo/addons/stock_product_shelfinfo @@ -0,0 +1 @@ +../../../../stock_product_shelfinfo \ No newline at end of file diff --git a/setup/stock_product_shelfinfo/setup.py b/setup/stock_product_shelfinfo/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/stock_product_shelfinfo/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_storage/README.rst b/stock_product_shelfinfo/README.rst similarity index 52% rename from stock_storage/README.rst rename to stock_product_shelfinfo/README.rst index 18a29aae..ff6fd05b 100644 --- a/stock_storage/README.rst +++ b/stock_product_shelfinfo/README.rst @@ -1,6 +1,6 @@ -============= -Stock Storage -============= +=============================== +Stock Product Shelf Information +=============================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -10,31 +10,42 @@ Stock Storage .. |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-LGPL--3-blue.png - :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html - :alt: License: LGPL-3 +.. |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-qrtl%2Faxls--custom-lightgray.png?logo=github - :target: https://github.com/qrtl/axls-custom/tree/16.0/stock_storage + :target: https://github.com/qrtl/axls-custom/tree/16.0/stock_product_shelfinfo :alt: qrtl/axls-custom |badge1| |badge2| |badge3| -This module does the following: - -* +This module adds a new model Product Shelf Information (product.shelfinfo) to keep +the static shelf details per product per location, and show the information in +relevant transactions and reports to facilitate warehouse operations. **Table of contents** .. contents:: :local: +Usage +===== + +Go to *Inventory > Products > Product Shelf Information* and create records for +combinations of product, location and company. These records show in product forms +(Inventory tab) as well. + +Generated ID (name) of the Shelf Information record should show for relevant internal +locations in the stock move records of the picking form, as well as in the picking +report, to facilitate the picking/store operations. + 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -49,6 +60,6 @@ Authors Maintainers ~~~~~~~~~~~ -This module is part of the `qrtl/axls-custom `_ project on GitHub. +This module is part of the `qrtl/axls-custom `_ project on GitHub. You are welcome to contribute. diff --git a/stock_storage/__init__.py b/stock_product_shelfinfo/__init__.py similarity index 100% rename from stock_storage/__init__.py rename to stock_product_shelfinfo/__init__.py diff --git a/stock_product_shelfinfo/__manifest__.py b/stock_product_shelfinfo/__manifest__.py new file mode 100644 index 00000000..bbe66e42 --- /dev/null +++ b/stock_product_shelfinfo/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Stock Product Shelf Information", + "version": "16.0.1.0.0", + "author": "Quartile Limited", + "website": "https://www.quartile.co", + "category": "Warehouse", + "license": "AGPL-3", + "depends": ["stock"], + "data": [ + "security/ir.model.access.csv", + "security/product_shelfinfo_security.xml", + "reports/report_stockpicking_operations.xml", + "views/product_shelfinfo_views.xml", + "views/product_template_views.xml", + "views/stock_picking_views.xml", + ], + "installable": True, +} diff --git a/stock_product_shelfinfo/i18n/ja.po b/stock_product_shelfinfo/i18n/ja.po new file mode 100644 index 00000000..b53c3ec6 --- /dev/null +++ b/stock_product_shelfinfo/i18n/ja.po @@ -0,0 +1,163 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_product_shelfinfo +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-03-20 05:24+0000\n" +"PO-Revision-Date: 2023-03-20 05:24+0000\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_product_shelfinfo +#. odoo-python +#: code:addons/stock_product_shelfinfo/models/product_shelfinfo.py:0 +#, python-format +msgid "" +"Another record already exists for the given combination of product, location" +" and company." +msgstr "そのプロダクト、ロケーション、会社の組み合わせに対するレコードは既に存在しています。" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__bucket +msgid "Bucket" +msgstr "引出" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__company_id +msgid "Company" +msgstr "会社" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__create_uid +msgid "Created by" +msgstr "作成者" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__create_date +msgid "Created on" +msgstr "作成日" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__display_name +msgid "Display Name" +msgstr "表示名" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__name +msgid "Generated ID" +msgstr "生成されたID" + +#. module: stock_product_shelfinfo +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view +msgid "Group By" +msgstr "グループ化" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__id +msgid "ID" +msgstr "ID" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__ref +msgid "Internal Reference" +msgstr "内部参照" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo____last_update +msgid "Last Modified on" +msgstr "最終更新日" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__write_uid +msgid "Last Updated by" +msgstr "最終更新者" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__write_date +msgid "Last Updated on" +msgstr "最終更新日" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__location_id +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view +msgid "Location" +msgstr "ロケーション" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__memo +msgid "Memo" +msgstr "メモ" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__position +msgid "Position" +msgstr "位置" + +#. module: stock_product_shelfinfo +#: model:ir.model,name:stock_product_shelfinfo.model_product_template +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__product_id +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view +msgid "Product" +msgstr "プロダクト" + +#. module: stock_product_shelfinfo +#: model:ir.actions.act_window,name:stock_product_shelfinfo.action_product_shelfinfo_view +#: model:ir.ui.menu,name:stock_product_shelfinfo.menu_product_shelfinfo +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.view_product_shelfinfo_form +msgid "Product Shelf Information" +msgstr "棚情報" + +#. module: stock_product_shelfinfo +#: model:ir.model,name:stock_product_shelfinfo.model_product_shelfinfo +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_shelfinfo_search_view +msgid "Product Shelfinfo" +msgstr "棚情報" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__product_tmpl_id +msgid "Product Template" +msgstr "プロダクトテンプレート" + +#. module: stock_product_shelfinfo +#: model:ir.model,name:stock_product_shelfinfo.model_product_product +msgid "Product Variant" +msgstr "プロダクトバリアント" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__sequence +msgid "Sequence" +msgstr "シークエンス" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_shelfinfo__shelf +msgid "Shelf" +msgstr "棚" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_stock_move__shelfinfo_src_id +msgid "Shelf Info. (From)" +msgstr "棚情報(移動元)" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_stock_move__shelfinfo_dest_id +msgid "Shelf Info. (To)" +msgstr "棚情報(移動先)" + +#. module: stock_product_shelfinfo +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_product__shelfinfo_ids +#: model:ir.model.fields,field_description:stock_product_shelfinfo.field_product_template__shelfinfo_ids +#: model_terms:ir.ui.view,arch_db:stock_product_shelfinfo.product_template_form_view +msgid "Shelf Information" +msgstr "棚情報" + +#. module: stock_product_shelfinfo +#: model:ir.model,name:stock_product_shelfinfo.model_stock_move +msgid "Stock Move" +msgstr "在庫移動" diff --git a/stock_product_shelfinfo/models/__init__.py b/stock_product_shelfinfo/models/__init__.py new file mode 100644 index 00000000..3d0a4af4 --- /dev/null +++ b/stock_product_shelfinfo/models/__init__.py @@ -0,0 +1,4 @@ +from . import product_product +from . import product_shelfinfo +from . import product_template +from . import stock_move diff --git a/stock_product_shelfinfo/models/product_product.py b/stock_product_shelfinfo/models/product_product.py new file mode 100644 index 00000000..aebbe20a --- /dev/null +++ b/stock_product_shelfinfo/models/product_product.py @@ -0,0 +1,14 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductProduct(models.Model): + _inherit = "product.product" + + shelfinfo_ids = fields.One2many( + "product.shelfinfo", + "product_id", + string="Shelf Information", + ) diff --git a/stock_product_shelfinfo/models/product_shelfinfo.py b/stock_product_shelfinfo/models/product_shelfinfo.py new file mode 100644 index 00000000..c55c7b6f --- /dev/null +++ b/stock_product_shelfinfo/models/product_shelfinfo.py @@ -0,0 +1,67 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError + + +class ProductShelfinfo(models.Model): + _name = "product.shelfinfo" + _description = "Product Shelfinfo" + _order = "sequence" + + name = fields.Char("Generated ID", compute="_compute_name") + product_id = fields.Many2one( + "product.product", + required=True, + domain="[('detailed_type', '!=', 'service')]", + ) + product_tmpl_id = fields.Many2one( + "product.template", + related="product_id.product_tmpl_id", + store=True, + ) + location_id = fields.Many2one( + "stock.location", + required=True, + domain="[('usage', '=', 'internal')]", + ) + company_id = fields.Many2one( + "res.company", + default=lambda self: self.env.company, + required=True, + ) + shelf = fields.Char(required=True) + bucket = fields.Char() + position = fields.Char() + memo = fields.Char() + ref = fields.Char("Internal Reference") + sequence = fields.Integer(default=1) + + @api.constrains("product_id", "location_id", "company_id") + def _check_product_location_unique(self): + for record in self: + existing_rec = self.search( + [ + ("product_id", "=", record.product_id.id), + ("location_id", "=", record.location_id.id), + ("company_id", "=", record.company_id.id), + ("id", "!=", self.id), + ] + ) + if existing_rec: + raise ValidationError( + _( + "Another record already exists for the given combination of " + "product, location and company." + ) + ) + + @api.depends("shelf", "bucket", "position") + def _compute_name(self): + for record in self: + record.name = record.shelf + if record.bucket: + record.name += "-" + record.bucket + if record.position: + record.name += "-" + record.position diff --git a/stock_product_shelfinfo/models/product_template.py b/stock_product_shelfinfo/models/product_template.py new file mode 100644 index 00000000..7a46fad8 --- /dev/null +++ b/stock_product_shelfinfo/models/product_template.py @@ -0,0 +1,14 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + shelfinfo_ids = fields.One2many( + "product.shelfinfo", + "product_tmpl_id", + string="Shelf Information", + ) diff --git a/stock_product_shelfinfo/models/stock_move.py b/stock_product_shelfinfo/models/stock_move.py new file mode 100644 index 00000000..77624709 --- /dev/null +++ b/stock_product_shelfinfo/models/stock_move.py @@ -0,0 +1,34 @@ +# Copyright 2023 Quartile Limited +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class StockMove(models.Model): + _inherit = "stock.move" + + shelfinfo_src_id = fields.Many2one( + "product.shelfinfo", + string="Shelf Info. (From)", + compute="_compute_shelfinfo", + store=True, + ) + shelfinfo_dest_id = fields.Many2one( + "product.shelfinfo", + string="Shelf Info. (To)", + compute="_compute_shelfinfo", + store=True, + ) + + @api.depends("product_id", "location_id", "location_dest_id") + def _compute_shelfinfo(self): + for move in self: + move.shelfinfo_src_id = False + move.shelfinfo_dest_id = False + loc_src = move.location_id + loc_dest = move.location_dest_id + for shelfinfo in move.product_id.shelfinfo_ids: + if loc_src.usage == "internal" and loc_src == shelfinfo.location_id: + move.shelfinfo_src_id = shelfinfo + if loc_dest.usage == "internal" and loc_dest == shelfinfo.location_id: + move.shelfinfo_dest_id = shelfinfo diff --git a/stock_product_shelfinfo/readme/DESCRIPTION.rst b/stock_product_shelfinfo/readme/DESCRIPTION.rst new file mode 100644 index 00000000..e16a53a5 --- /dev/null +++ b/stock_product_shelfinfo/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module adds a new model Product Shelf Information (product.shelfinfo) to keep +the static shelf details per product per location, and show the information in +relevant transactions and reports to facilitate warehouse operations. diff --git a/stock_product_shelfinfo/readme/USAGE.rst b/stock_product_shelfinfo/readme/USAGE.rst new file mode 100644 index 00000000..3da79fa4 --- /dev/null +++ b/stock_product_shelfinfo/readme/USAGE.rst @@ -0,0 +1,7 @@ +Go to *Inventory > Products > Product Shelf Information* and create records for +combinations of product, location and company. These records show in product forms +(Inventory tab) as well. + +Generated ID (name) of the Shelf Information record should show for relevant internal +locations in the stock move records of the picking form, as well as in the picking +report, to facilitate the picking/store operations. diff --git a/stock_product_shelfinfo/reports/report_stockpicking_operations.xml b/stock_product_shelfinfo/reports/report_stockpicking_operations.xml new file mode 100644 index 00000000..b9074bd3 --- /dev/null +++ b/stock_product_shelfinfo/reports/report_stockpicking_operations.xml @@ -0,0 +1,15 @@ + + + + diff --git a/stock_product_shelfinfo/security/ir.model.access.csv b/stock_product_shelfinfo/security/ir.model.access.csv new file mode 100644 index 00000000..410265a9 --- /dev/null +++ b/stock_product_shelfinfo/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_product_shelfinfo_user,access.product.shelfinfo.user,model_product_shelfinfo,stock.group_stock_user,1,0,0,0 +access_product_shelfinfo_manager,access.product.shelfinfo.manager,model_product_shelfinfo,stock.group_stock_manager,1,1,1,1 diff --git a/stock_product_shelfinfo/security/product_shelfinfo_security.xml b/stock_product_shelfinfo/security/product_shelfinfo_security.xml new file mode 100644 index 00000000..0bf428e3 --- /dev/null +++ b/stock_product_shelfinfo/security/product_shelfinfo_security.xml @@ -0,0 +1,10 @@ + + + + Product shelfinfo multi-company + + ['|', ('company_id', 'in', company_ids), ('company_id', '=', False)] + + diff --git a/stock_storage/static/description/index.html b/stock_product_shelfinfo/static/description/index.html similarity index 80% rename from stock_storage/static/description/index.html rename to stock_product_shelfinfo/static/description/index.html index c2d11880..e9dfc770 100644 --- a/stock_storage/static/description/index.html +++ b/stock_product_shelfinfo/static/description/index.html @@ -4,7 +4,7 @@ -Stock Storage +Stock Product Shelf Information -
-

Stock Storage

+
+

Stock Product Shelf Information

-

Beta License: LGPL-3 qrtl/axls-custom

-

This module does the following:

-
    -
  • -
+

Beta License: AGPL-3 qrtl/axls-custom

+

This module adds a new model Product Shelf Information (product.shelfinfo) to keep +the static shelf details per product per location, and show the information in +relevant transactions and reports to facilitate warehouse operations.

Table of contents

+
+

Usage

+

Go to Inventory > Products > Product Shelf Information and create records for +combinations of product, location and company. These records show in product forms +(Inventory tab) as well.

+

Generated ID (name) of the Shelf Information record should show for relevant internal +locations in the stock move records of the picking form, as well as in the picking +report, to facilitate the picking/store operations.

+
-

Bug Tracker

+

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.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Quartile Limited
-

Maintainers

-

This module is part of the qrtl/axls-custom project on GitHub.

+

Maintainers

+

This module is part of the qrtl/axls-custom project on GitHub.

You are welcome to contribute.

diff --git a/stock_product_shelfinfo/views/product_shelfinfo_views.xml b/stock_product_shelfinfo/views/product_shelfinfo_views.xml new file mode 100644 index 00000000..501f9126 --- /dev/null +++ b/stock_product_shelfinfo/views/product_shelfinfo_views.xml @@ -0,0 +1,98 @@ + + + + product.shelfinfo.form + product.shelfinfo + +
+ + + + + + + + + + + + + + + + + + +
+
+
+ + product.shelfinfo.tree + product.shelfinfo + tree + + + + + + + + + + + + + + + + + + product.shelfinfo.search + product.shelfinfo + + + + + + + + + + + + + + Product Shelf Information + product.shelfinfo + tree,form + + + +
diff --git a/stock_product_shelfinfo/views/product_template_views.xml b/stock_product_shelfinfo/views/product_template_views.xml new file mode 100644 index 00000000..b73bdb9f --- /dev/null +++ b/stock_product_shelfinfo/views/product_template_views.xml @@ -0,0 +1,38 @@ + + + + product.template.common.form + product.template + + + + + + + + + + + + + + + + + + + + + diff --git a/stock_product_shelfinfo/views/stock_picking_views.xml b/stock_product_shelfinfo/views/stock_picking_views.xml new file mode 100644 index 00000000..44069ae9 --- /dev/null +++ b/stock_product_shelfinfo/views/stock_picking_views.xml @@ -0,0 +1,25 @@ + + + + stock.picking.form + stock.picking + + + + + + + + + diff --git a/stock_storage/__manifest__.py b/stock_storage/__manifest__.py deleted file mode 100644 index 358d2207..00000000 --- a/stock_storage/__manifest__.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2023 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -{ - "name": "Stock Storage", - "version": "16.0.1.0.0", - "author": "Quartile Limited", - "website": "https://www.quartile.co", - "category": "Stock", - "license": "LGPL-3", - "depends": ["product","stock"], - "data": [ - "security/ir.model.access.csv", - "views/stock_move_line_views.xml", - "views/stock_move_views.xml", - "views/product_template_views.xml", - "views/stock_storage_views.xml", - ], - "installable": True, -} diff --git a/stock_storage/i18n/ja.po b/stock_storage/i18n/ja.po deleted file mode 100644 index e69de29b..00000000 diff --git a/stock_storage/models/__init__.py b/stock_storage/models/__init__.py deleted file mode 100644 index 2acaf747..00000000 --- a/stock_storage/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from . import product_template -from . import stock_move -from . import stock_storage -from . import stock_move_line diff --git a/stock_storage/models/product_product.py b/stock_storage/models/product_product.py deleted file mode 100644 index d9fe7417..00000000 --- a/stock_storage/models/product_product.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2022 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import models, fields - - -class ProductProduct(models.Model): - _inherit = "product.product" - - storage_ids = fields.Many2many("stock.storage", domain=lambda self: [('product_id', '=', self.id)]) \ No newline at end of file diff --git a/stock_storage/models/product_template.py b/stock_storage/models/product_template.py deleted file mode 100644 index 044fb436..00000000 --- a/stock_storage/models/product_template.py +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright 2022 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import fields, models - - -class ProductTemplate(models.Model): - _inherit = "product.template" - - storage_ids = fields.Many2many("stock.storage", domain=lambda self: [('product_id', '=', self.id)]) \ No newline at end of file diff --git a/stock_storage/models/stock_move.py b/stock_storage/models/stock_move.py deleted file mode 100644 index 9d28e8fb..00000000 --- a/stock_storage/models/stock_move.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2023 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models, fields - - -class StockMove(models.Model): - _inherit = "stock.move" - - generated_id = fields.Char(compute="compute_generated_id",store=True) - - @api.depends("location_id","product_id") - def compute_generated_id(self): - for rec in self: - storage_id = self.env["stock.storage"].search([('location_id', '=', rec.location_dest_id.id), ('product_id', '=', rec.product_id.id)],limit=1) - if storage_id: - self.generated_id = storage_id.generated_id - else: - self.generated_id = False - diff --git a/stock_storage/models/stock_move_line.py b/stock_storage/models/stock_move_line.py deleted file mode 100644 index cc8c6066..00000000 --- a/stock_storage/models/stock_move_line.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2023 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models, fields - - -class StockMoveLine(models.Model): - _inherit = "stock.move.line" - - generated_id = fields.Char(compute="compute_generated_id",store=True) - - @api.depends("location_id","product_id") - def compute_generated_id(self): - for rec in self: - storage_id = self.env["stock.storage"].search([('location_id', '=', rec.location_dest_id.id), ('product_id', '=', rec.product_id.id)],limit=1) - if storage_id: - self.generated_id = storage_id.generated_id - else: - self.generated_id = False - diff --git a/stock_storage/models/stock_storage.py b/stock_storage/models/stock_storage.py deleted file mode 100644 index 9cc6e9b2..00000000 --- a/stock_storage/models/stock_storage.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2023 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). - -from odoo import api, models , fields - - -class StockStorage(models.Model): - _name = "stock.storage" - _description = "Stock Storage" - - company_id = fields.Many2one("res.company") - product_id = fields.Many2one("product.product") - location_id = fields.Many2one("stock.location") - shelf = fields.Char() - bucket = fields.Char() - position = fields.Char() - memo = fields.Char() - ref = fields.Char("Internal Reference") - generated_id = fields.Char(compute="compute_generated_id") - - @api.depends('shelf', 'bucket', 'position') - def compute_generated_id(self): - for record in self: - record.generated_id = '-'.join([record.shelf or '', record.bucket or '', record.position or '']) - diff --git a/stock_storage/readme/DESCRIPTION.rst b/stock_storage/readme/DESCRIPTION.rst deleted file mode 100644 index 0b06411e..00000000 --- a/stock_storage/readme/DESCRIPTION.rst +++ /dev/null @@ -1,3 +0,0 @@ -This module does the following: - -* \ No newline at end of file diff --git a/stock_storage/security/ir.model.access.csv b/stock_storage/security/ir.model.access.csv deleted file mode 100644 index 73191faa..00000000 --- a/stock_storage/security/ir.model.access.csv +++ /dev/null @@ -1,3 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_stock_storage_manager,access.stock.storage.manager,model_stock_storage,stock.group_stock_manager,1,1,1,1 -access_stock_storage_user,access.stock.storage.user,model_stock_storage,stock.group_stock_user,1,0,0,0 diff --git a/stock_storage/views/product_product_views.xml b/stock_storage/views/product_product_views.xml deleted file mode 100644 index 0d298ad7..00000000 --- a/stock_storage/views/product_product_views.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/stock_storage/views/product_template_views.xml b/stock_storage/views/product_template_views.xml deleted file mode 100644 index b479d8a7..00000000 --- a/stock_storage/views/product_template_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - product.template.product.form - product.template - - - - - - - - - - diff --git a/stock_storage/views/stock_move_line_views.xml b/stock_storage/views/stock_move_line_views.xml deleted file mode 100644 index 686c6213..00000000 --- a/stock_storage/views/stock_move_line_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - stock.move.line.tree - stock.move.line - - - - - - - - diff --git a/stock_storage/views/stock_move_views.xml b/stock_storage/views/stock_move_views.xml deleted file mode 100644 index 9098fdba..00000000 --- a/stock_storage/views/stock_move_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - stock.move.tree - stock.move - - - - - - - - diff --git a/stock_storage/views/stock_storage_views.xml b/stock_storage/views/stock_storage_views.xml deleted file mode 100644 index 7f07780e..00000000 --- a/stock_storage/views/stock_storage_views.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - stock.storage.tree - stock.storage - tree - - - - - - - - - - - - - - - - Stock Storage - stock.storage - tree,form - - - -