diff --git a/stock_location_tag/README.rst b/stock_location_tag/README.rst new file mode 100644 index 000000000..51ee969fb --- /dev/null +++ b/stock_location_tag/README.rst @@ -0,0 +1,64 @@ +================== +Stock location tag +================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:52f8415c87c14905fc2db50c839926479bb3c394f1bf5af8abd06caf74e1c9bf + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/NuoBiT/odoo-addons/tree/18.0/stock_location_tag + :alt: NuoBiT/odoo-addons + +|badge1| |badge2| |badge3| + +This module adds tags on location. + +**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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* NuoBiT Solutions SL + +Contributors +------------ + +- `NuoBiT `__: + + - Eric Antones eantones@nuobit.com + - Bijaya Kumal bkumal@nuobit.com + - Deniz Gallo dgallo@nuobit.com + +Maintainers +----------- + +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/stock_location_tag/__init__.py b/stock_location_tag/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/stock_location_tag/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_location_tag/__manifest__.py b/stock_location_tag/__manifest__.py new file mode 100644 index 000000000..c61290424 --- /dev/null +++ b/stock_location_tag/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright NuoBiT Solutions SL - Eric Antones +# Copyright NuoBiT Solutions SL 2025 - Bijaya Kumal +# Copyright NuoBiT Solutions SL 2025 - Deniz Gallo +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + "name": "Stock location tag", + "summary": "This module adds tags on location", + "author": "NuoBiT Solutions SL", + "category": "Warehouse", + "version": "18.0.1.0.0", + "license": "AGPL-3", + "website": "https://github.com/NuoBiT/odoo-addons", + "depends": [ + "stock", + ], + "data": [ + "security/stock_location_tag_security.xml", + "security/ir.model.access.csv", + "views/stock_location_views.xml", + "views/stock_location_tag_views.xml", + ], +} diff --git a/stock_location_tag/i18n/es.po b/stock_location_tag/i18n/es.po new file mode 100644 index 000000000..674b07af0 --- /dev/null +++ b/stock_location_tag/i18n/es.po @@ -0,0 +1,83 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_location_tag +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-22 07:38+0000\n" +"PO-Revision-Date: 2025-09-22 07:38+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_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__color +msgid "Color Index" +msgstr "Indice de color" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__company_id +msgid "Company" +msgstr "Compañía" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__create_date +msgid "Created on" +msgstr "Creado el" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__display_name +msgid "Display Name" +msgstr "Nombre para mostrar" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__id +msgid "ID" +msgstr "ID" + +#. module: stock_location_tag +#: model:ir.model,name:stock_location_tag.model_stock_location +msgid "Inventory Locations" +msgstr "Ubicaciones de inventario" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: stock_location_tag +#: model:ir.actions.act_window,name:stock_location_tag.stock_location_tag_action +#: model:ir.model,name:stock_location_tag.model_stock_location_tag +#: model:ir.ui.menu,name:stock_location_tag.stock_location_tag_menu +msgid "Location Tags" +msgstr "Etiquetas de ubicación" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location_tag__name +msgid "Name" +msgstr "Nombre" + +#. module: stock_location_tag +#: model:ir.model.constraint,message:stock_location_tag.constraint_stock_location_tag_name_company_uniq +msgid "Tag name already exists. It must be unique per company!" +msgstr "¡El nombre de la etiqueta ya existe. ¡Debe ser único por compañía!" + +#. module: stock_location_tag +#: model:ir.model.fields,field_description:stock_location_tag.field_stock_location__tag_ids +msgid "Tags" +msgstr "Etiquetas" diff --git a/stock_location_tag/models/__init__.py b/stock_location_tag/models/__init__.py new file mode 100644 index 000000000..3dfd4b9c2 --- /dev/null +++ b/stock_location_tag/models/__init__.py @@ -0,0 +1,2 @@ +from . import stock_location +from . import stock_location_tag diff --git a/stock_location_tag/models/stock_location.py b/stock_location_tag/models/stock_location.py new file mode 100644 index 000000000..e7b7842f4 --- /dev/null +++ b/stock_location_tag/models/stock_location.py @@ -0,0 +1,16 @@ +# Copyright NuoBiT Solutions SL - Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import fields, models + + +class StockLocation(models.Model): + _inherit = "stock.location" + + tag_ids = fields.Many2many( + comodel_name="stock.location.tag", + string="Tags", + relation="stock_location_location_tag_rel", + column1="location_id", + column2="tag_id", + ) diff --git a/stock_location_tag/models/stock_location_tag.py b/stock_location_tag/models/stock_location_tag.py new file mode 100644 index 000000000..41f1bdf74 --- /dev/null +++ b/stock_location_tag/models/stock_location_tag.py @@ -0,0 +1,27 @@ +# Copyright NuoBiT Solutions SL - Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import fields, models + + +class StockLocationTag(models.Model): + _name = "stock.location.tag" + _description = "Location Tags" + + name = fields.Char(required=True, translate=True) + color = fields.Integer(string="Color Index") + company_id = fields.Many2one( + "res.company", + string="Company", + default=lambda self: self.env.company, + readonly=True, + required=True, + ) + + _sql_constraints = [ + ( + "name_company_uniq", + "unique (name,company_id)", + "Tag name already exists. It must be unique per company!", + ), + ] diff --git a/stock_location_tag/pyproject.toml b/stock_location_tag/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_location_tag/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_location_tag/readme/CONTRIBUTORS.md b/stock_location_tag/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..325bee193 --- /dev/null +++ b/stock_location_tag/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [NuoBiT](https://www.nuobit.com): + - Eric Antones + - Bijaya Kumal + - Deniz Gallo diff --git a/stock_location_tag/readme/DESCRIPTION.md b/stock_location_tag/readme/DESCRIPTION.md new file mode 100644 index 000000000..74dcece25 --- /dev/null +++ b/stock_location_tag/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds tags on location. diff --git a/stock_location_tag/security/ir.model.access.csv b/stock_location_tag/security/ir.model.access.csv new file mode 100644 index 000000000..b8d54e719 --- /dev/null +++ b/stock_location_tag/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_stock_location_tag_manager,access_stock_location_tag.manager,model_stock_location_tag,stock.group_stock_manager,1,1,1,1 +access_stock_location_tag_user,access_stock_location_tag.user,model_stock_location_tag,base.group_user,1,0,0,0 diff --git a/stock_location_tag/security/stock_location_tag_security.xml b/stock_location_tag/security/stock_location_tag_security.xml new file mode 100644 index 000000000..9dd5e1c08 --- /dev/null +++ b/stock_location_tag/security/stock_location_tag_security.xml @@ -0,0 +1,14 @@ + + + + + Stock location tag multi-company rule + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + diff --git a/stock_location_tag/static/description/icon.png b/stock_location_tag/static/description/icon.png new file mode 100644 index 000000000..1cd641e79 Binary files /dev/null and b/stock_location_tag/static/description/icon.png differ diff --git a/stock_location_tag/static/description/index.html b/stock_location_tag/static/description/index.html new file mode 100644 index 000000000..c378c31ae --- /dev/null +++ b/stock_location_tag/static/description/index.html @@ -0,0 +1,421 @@ + + + + + +Stock location tag + + + +
+

Stock location tag

+ + +

Beta License: AGPL-3 NuoBiT/odoo-addons

+

This module adds tags on location.

+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • NuoBiT Solutions SL
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/stock_location_tag/views/stock_location_tag_views.xml b/stock_location_tag/views/stock_location_tag_views.xml new file mode 100644 index 000000000..dcffa4cb1 --- /dev/null +++ b/stock_location_tag/views/stock_location_tag_views.xml @@ -0,0 +1,44 @@ + + + + + stock.location.tag.view.tree + stock.location.tag + + + + + + + + + + stock.location.tag.view.form + stock.location.tag + +
+ + + + + + + + +
+
+
+ + + Location Tags + stock.location.tag + list,form + + + +
diff --git a/stock_location_tag/views/stock_location_views.xml b/stock_location_tag/views/stock_location_views.xml new file mode 100644 index 000000000..0b3f2b256 --- /dev/null +++ b/stock_location_tag/views/stock_location_views.xml @@ -0,0 +1,20 @@ + + + + + stock.location.form + stock.location + + + + + + + +