From 6958a6b921f438249d5160a9f60dcc5843519e5f Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Fri, 5 Apr 2019 09:31:32 +0200 Subject: [PATCH 1/8] [ADD] stock_location_code: new module --- stock_location_code/README.rst | 26 ++++++++++++++++++ stock_location_code/__init__.py | 5 ++++ stock_location_code/__manifest__.py | 20 ++++++++++++++ stock_location_code/models/__init__.py | 5 ++++ stock_location_code/models/models.py | 15 ++++++++++ .../static/description/icon.png | Bin 0 -> 6342 bytes .../views/stock_location_views.xml | 16 +++++++++++ 7 files changed, 87 insertions(+) create mode 100644 stock_location_code/README.rst create mode 100644 stock_location_code/__init__.py create mode 100644 stock_location_code/__manifest__.py create mode 100644 stock_location_code/models/__init__.py create mode 100644 stock_location_code/models/models.py create mode 100644 stock_location_code/static/description/icon.png create mode 100644 stock_location_code/views/stock_location_views.xml diff --git a/stock_location_code/README.rst b/stock_location_code/README.rst new file mode 100644 index 000000000..3a386ea46 --- /dev/null +++ b/stock_location_code/README.rst @@ -0,0 +1,26 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=================== +Stock location code +=================== + +This module adds unique code per company on location. + + +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. + +Credits +======= + +Contributors +------------ + +* Eric Antones diff --git a/stock_location_code/__init__.py b/stock_location_code/__init__.py new file mode 100644 index 000000000..8eb6c995c --- /dev/null +++ b/stock_location_code/__init__.py @@ -0,0 +1,5 @@ +# Copyright NuoBiT Solutions, S.L. () +# Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from . import models \ No newline at end of file diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py new file mode 100644 index 000000000..12856b7ed --- /dev/null +++ b/stock_location_code/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright NuoBiT Solutions, S.L. () +# Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +{ + 'name': "Stock location code", + 'summary': "This module adds unique code per company on location", + 'author': 'NuoBiT Solutions, S.L., Eric Antones', + 'category': 'Warehouse', + 'version': '11.0.0.1.0', + 'license': 'AGPL-3', + 'website': 'https://github.com/nuobit', + 'depends': [ + 'stock', + ], + 'data': [ + 'views/stock_location_views.xml', + ], + 'installable': True, +} diff --git a/stock_location_code/models/__init__.py b/stock_location_code/models/__init__.py new file mode 100644 index 000000000..38b2ba65b --- /dev/null +++ b/stock_location_code/models/__init__.py @@ -0,0 +1,5 @@ +# Copyright NuoBiT Solutions, S.L. () +# Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from . import models diff --git a/stock_location_code/models/models.py b/stock_location_code/models/models.py new file mode 100644 index 000000000..f0c609ee9 --- /dev/null +++ b/stock_location_code/models/models.py @@ -0,0 +1,15 @@ +# Copyright NuoBiT Solutions, S.L. () +# Eric Antones +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from odoo import models, fields + + +class Location(models.Model): + _inherit = "stock.location" + + code = fields.Char(string='Code') + + _sql_constraints = [ + ('location_code_uniq', 'unique(code, company_id)', "A code can only be assigned to one location per company!"), + ] diff --git a/stock_location_code/static/description/icon.png b/stock_location_code/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1cd641e792c30455187ca30940bc0f329ce8bbb0 GIT binary patch literal 6342 zcmd^^hf`C}*TzHWpfm-MZa|7OjYtjE(4`3pP0Eid3J8V{0s)mKJ<q zp^9|rp$mb~2}po9-@oIXJG(oxcjoS%d!O@s&d!Z9HP*e##KQyt0IurmK_64bp8pyH z9i^|ds>-JfbWVo4P{8GX*QeIfbjl2)kDfIG0ALvZuTgp2ZfK=U();NfY11z-vM>r= zo6RyI007+P`cO@apy}VqnaiVCLL`CEUGVGYE&5WpdhhbZv%|*-Y|2t(4~Cq|y`-Nmm-W zxa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F2)FaAkYhQL$Z58+`p75dj7RKse#Z!uacCm z0@|m~U!QZOdb|V~`ktFK4;lg_ZOCjFXeV4`jGj&bh7Q6BEyN8~yGd*JyzwFbIRaAf z#KG$rvQxWFvqwn`i6jBQ?6o+k+oOC)Gj9ChlgabiScr};b5|opxUYjCZOwmhjTj6W zFzJt_htTuopW4IRiQ}r0L}`w=pE{HN<@(9Hl11P5cHmN6A1F^sg2OWXcw<+q2x>I5 zq9Bu>PBob6#^vrr<|IC)m+zJpFRRcCVsqbspNybriu&!R=H^@RcG#aBGz9RH}ZI=>4 zi(m?IA?Vr$Q7?wN6ZW7H`S?3}K8=$7J5MjWKri=_igw1%J?0~*6e_Ii*1&23dGcF} z&=vaMgF!^veGQ1f$3k?WK5Jaw%==+Bb!tI6zQ68&-dQ3Orl+Tqh#Nt?dBEV_w^wkjY+qJ+X*NCMs%J-Lc4%}pKryM#O)O&9 un*HHVB-AlUN`suyDkKONktc!@Ievk;6wT20MOSqhE{1gM*SZGeqiYU literal 0 HcmV?d00001 diff --git a/stock_location_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml new file mode 100644 index 000000000..9bbe01f45 --- /dev/null +++ b/stock_location_code/views/stock_location_views.xml @@ -0,0 +1,16 @@ + + + + + stock.picking.form.inherit.code + stock.location + + + + + + + + \ No newline at end of file From 9b1ba1d5ffbfebc967588463b7bdbd6d0193b2eb Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Fri, 5 Apr 2019 09:50:07 +0200 Subject: [PATCH 2/8] [IMP] stock_location_code: add code on tree view --- stock_location_code/__manifest__.py | 2 +- stock_location_code/views/stock_location_views.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index 12856b7ed..8f16eafc4 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -7,7 +7,7 @@ 'summary': "This module adds unique code per company on location", 'author': 'NuoBiT Solutions, S.L., Eric Antones', 'category': 'Warehouse', - 'version': '11.0.0.1.0', + 'version': '11.0.0.2.0', 'license': 'AGPL-3', 'website': 'https://github.com/nuobit', 'depends': [ diff --git a/stock_location_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml index 9bbe01f45..2807091cb 100644 --- a/stock_location_code/views/stock_location_views.xml +++ b/stock_location_code/views/stock_location_views.xml @@ -13,4 +13,15 @@ + + + stock.picking.tree.inherit.code + stock.location + + + + + + + \ No newline at end of file From 2e458897d664b281c2a533cdef5a1cad0622f997 Mon Sep 17 00:00:00 2001 From: Eric Antones Date: Fri, 5 Apr 2019 11:30:15 +0200 Subject: [PATCH 3/8] [FIX] stock_location_code: copy paste error on view name --- stock_location_code/__manifest__.py | 2 +- stock_location_code/views/stock_location_views.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index 8f16eafc4..9c346c5bc 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -7,7 +7,7 @@ 'summary': "This module adds unique code per company on location", 'author': 'NuoBiT Solutions, S.L., Eric Antones', 'category': 'Warehouse', - 'version': '11.0.0.2.0', + 'version': '11.0.0.2.1', 'license': 'AGPL-3', 'website': 'https://github.com/nuobit', 'depends': [ diff --git a/stock_location_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml index 2807091cb..4e5b4f430 100644 --- a/stock_location_code/views/stock_location_views.xml +++ b/stock_location_code/views/stock_location_views.xml @@ -4,7 +4,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) --> - stock.picking.form.inherit.code + stock.location.form.inherit.code stock.location @@ -15,7 +15,7 @@ - stock.picking.tree.inherit.code + stock.location.tree.inherit.code stock.location From d791994408a7f727248866ca350d3ec3967b1eb6 Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 30 Aug 2021 15:36:00 +0200 Subject: [PATCH 4/8] [IMP] stock_location_code: black, isort, prettier --- stock_location_code/__init__.py | 2 +- stock_location_code/__manifest__.py | 24 +++++++++---------- stock_location_code/models/models.py | 10 +++++--- .../views/stock_location_views.xml | 12 +++++----- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/stock_location_code/__init__.py b/stock_location_code/__init__.py index 8eb6c995c..38b2ba65b 100644 --- a/stock_location_code/__init__.py +++ b/stock_location_code/__init__.py @@ -2,4 +2,4 @@ # Eric Antones # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from . import models \ No newline at end of file +from . import models diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index 9c346c5bc..266fb2274 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -3,18 +3,18 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { - 'name': "Stock location code", - 'summary': "This module adds unique code per company on location", - 'author': 'NuoBiT Solutions, S.L., Eric Antones', - 'category': 'Warehouse', - 'version': '11.0.0.2.1', - 'license': 'AGPL-3', - 'website': 'https://github.com/nuobit', - 'depends': [ - 'stock', + "name": "Stock location code", + "summary": "This module adds unique code per company on location", + "author": "NuoBiT Solutions, S.L., Eric Antones", + "category": "Warehouse", + "version": "11.0.0.2.1", + "license": "AGPL-3", + "website": "https://github.com/nuobit/odoo-addons", + "depends": [ + "stock", ], - 'data': [ - 'views/stock_location_views.xml', + "data": [ + "views/stock_location_views.xml", ], - 'installable': True, + "installable": True, } diff --git a/stock_location_code/models/models.py b/stock_location_code/models/models.py index f0c609ee9..658dc3e82 100644 --- a/stock_location_code/models/models.py +++ b/stock_location_code/models/models.py @@ -2,14 +2,18 @@ # Eric Antones # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from odoo import models, fields +from odoo import fields, models class Location(models.Model): _inherit = "stock.location" - code = fields.Char(string='Code') + code = fields.Char(string="Code") _sql_constraints = [ - ('location_code_uniq', 'unique(code, company_id)', "A code can only be assigned to one location per company!"), + ( + "location_code_uniq", + "unique(code, company_id)", + "A code can only be assigned to one location per company!", + ), ] diff --git a/stock_location_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml index 4e5b4f430..22a9e4907 100644 --- a/stock_location_code/views/stock_location_views.xml +++ b/stock_location_code/views/stock_location_views.xml @@ -1,4 +1,4 @@ - + @@ -6,10 +6,10 @@ stock.location.form.inherit.code stock.location - + - + @@ -17,11 +17,11 @@ stock.location.tree.inherit.code stock.location - + - + - \ No newline at end of file + From 4087da950dbb0130019d2a5ab121b71c89c40c2e Mon Sep 17 00:00:00 2001 From: mreficent Date: Mon, 30 Aug 2021 15:38:09 +0200 Subject: [PATCH 5/8] [MIG] stock_location_code: Migration to 14.0 --- stock_location_code/README.rst | 6 +++--- stock_location_code/__init__.py | 2 -- stock_location_code/__manifest__.py | 2 +- stock_location_code/models/__init__.py | 2 -- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/stock_location_code/README.rst b/stock_location_code/README.rst index 3a386ea46..cc2d6b7e4 100644 --- a/stock_location_code/README.rst +++ b/stock_location_code/README.rst @@ -1,6 +1,6 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 =================== Stock location code diff --git a/stock_location_code/__init__.py b/stock_location_code/__init__.py index 38b2ba65b..21101d349 100644 --- a/stock_location_code/__init__.py +++ b/stock_location_code/__init__.py @@ -1,5 +1,3 @@ -# Copyright NuoBiT Solutions, S.L. () -# Eric Antones # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from . import models diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index 266fb2274..22015c4f8 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -7,7 +7,7 @@ "summary": "This module adds unique code per company on location", "author": "NuoBiT Solutions, S.L., Eric Antones", "category": "Warehouse", - "version": "11.0.0.2.1", + "version": "14.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/nuobit/odoo-addons", "depends": [ diff --git a/stock_location_code/models/__init__.py b/stock_location_code/models/__init__.py index 38b2ba65b..21101d349 100644 --- a/stock_location_code/models/__init__.py +++ b/stock_location_code/models/__init__.py @@ -1,5 +1,3 @@ -# Copyright NuoBiT Solutions, S.L. () -# Eric Antones # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from . import models From a510731d684bd47c8d035e2f06c7f97280b7abd4 Mon Sep 17 00:00:00 2001 From: bijaya Date: Tue, 4 Mar 2025 11:03:25 +0100 Subject: [PATCH 6/8] [MIG] stock_location_code: Migration to 16.0 --- stock_location_code/README.rst | 55 ++- stock_location_code/__init__.py | 2 - stock_location_code/__manifest__.py | 9 +- stock_location_code/models/__init__.py | 2 - stock_location_code/models/models.py | 6 +- stock_location_code/readme/CONTRIBUTORS.md | 3 + stock_location_code/readme/DESCRIPTION.md | 1 + .../static/description/index.html | 421 ++++++++++++++++++ .../views/stock_location_views.xml | 3 +- 9 files changed, 479 insertions(+), 23 deletions(-) create mode 100644 stock_location_code/readme/CONTRIBUTORS.md create mode 100644 stock_location_code/readme/DESCRIPTION.md create mode 100644 stock_location_code/static/description/index.html diff --git a/stock_location_code/README.rst b/stock_location_code/README.rst index cc2d6b7e4..d603e3884 100644 --- a/stock_location_code/README.rst +++ b/stock_location_code/README.rst @@ -1,26 +1,63 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - =================== Stock location code =================== +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:fb4daa6640711b24250482d792adce131278b4e466510f937a5bec209a379689 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/16.0/stock_location_code + :alt: nuobit/odoo-addons + +|badge1| |badge2| |badge3| + This module adds unique code per company 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 smashing it by providing a detailed and welcomed feedback. +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 ------------ -* Eric Antones +- `NuoBiT `__: + + - Eric Antones eantones@nuobit.com + - Bijaya Kumal bkumal@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_code/__init__.py b/stock_location_code/__init__.py index 21101d349..0650744f6 100644 --- a/stock_location_code/__init__.py +++ b/stock_location_code/__init__.py @@ -1,3 +1 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) - from . import models diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index 22015c4f8..a879dec2b 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -1,13 +1,13 @@ -# Copyright NuoBiT Solutions, S.L. () -# Eric Antones +# Copyright NuoBiT - Eric Antones +# Copyright NuoBiT 2025 - Bijaya Kumal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { "name": "Stock location code", "summary": "This module adds unique code per company on location", - "author": "NuoBiT Solutions, S.L., Eric Antones", + "author": "NuoBiT Solutions SL", "category": "Warehouse", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/nuobit/odoo-addons", "depends": [ @@ -16,5 +16,4 @@ "data": [ "views/stock_location_views.xml", ], - "installable": True, } diff --git a/stock_location_code/models/__init__.py b/stock_location_code/models/__init__.py index 21101d349..0650744f6 100644 --- a/stock_location_code/models/__init__.py +++ b/stock_location_code/models/__init__.py @@ -1,3 +1 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) - from . import models diff --git a/stock_location_code/models/models.py b/stock_location_code/models/models.py index 658dc3e82..0faef3d88 100644 --- a/stock_location_code/models/models.py +++ b/stock_location_code/models/models.py @@ -1,5 +1,5 @@ -# Copyright NuoBiT Solutions, S.L. () -# Eric Antones +# Copyright NuoBiT - Eric Antones +# Copyright NuoBiT 2025 - Bijaya Kumal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import fields, models @@ -8,7 +8,7 @@ class Location(models.Model): _inherit = "stock.location" - code = fields.Char(string="Code") + code = fields.Char() _sql_constraints = [ ( diff --git a/stock_location_code/readme/CONTRIBUTORS.md b/stock_location_code/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..09afb8b5c --- /dev/null +++ b/stock_location_code/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- [NuoBiT](https://www.nuobit.com): + - Eric Antones + - Bijaya Kumal diff --git a/stock_location_code/readme/DESCRIPTION.md b/stock_location_code/readme/DESCRIPTION.md new file mode 100644 index 000000000..8366bf8ad --- /dev/null +++ b/stock_location_code/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds unique code per company on location. diff --git a/stock_location_code/static/description/index.html b/stock_location_code/static/description/index.html new file mode 100644 index 000000000..7a912bf08 --- /dev/null +++ b/stock_location_code/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +Stock location code + + + +
+

Stock location code

+ + +

Beta License: AGPL-3 nuobit/odoo-addons

+

This module adds unique code per company 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_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml index 22a9e4907..d03359a67 100644 --- a/stock_location_code/views/stock_location_views.xml +++ b/stock_location_code/views/stock_location_views.xml @@ -1,6 +1,5 @@ - From 79295648b2c04ef9b515603c52339f6c3b06770d Mon Sep 17 00:00:00 2001 From: ??? Date: Fri, 19 Sep 2025 11:41:47 +0200 Subject: [PATCH 7/8] [IMP] stock_location_code: pre-commit auto fixes --- stock_location_code/README.rst | 12 ++++++------ stock_location_code/__manifest__.py | 2 +- stock_location_code/pyproject.toml | 3 +++ stock_location_code/static/description/index.html | 9 ++++----- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 stock_location_code/pyproject.toml diff --git a/stock_location_code/README.rst b/stock_location_code/README.rst index d603e3884..f93800a2f 100644 --- a/stock_location_code/README.rst +++ b/stock_location_code/README.rst @@ -16,9 +16,9 @@ Stock location code .. |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/16.0/stock_location_code - :alt: nuobit/odoo-addons +.. |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_code + :alt: NuoBiT/odoo-addons |badge1| |badge2| |badge3| @@ -32,10 +32,10 @@ This module adds unique code per company on location. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -58,6 +58,6 @@ Contributors Maintainers ----------- -This module is part of the `nuobit/odoo-addons `_ project on GitHub. +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. You are welcome to contribute. diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index a879dec2b..d707f4389 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -9,7 +9,7 @@ "category": "Warehouse", "version": "16.0.1.0.0", "license": "AGPL-3", - "website": "https://github.com/nuobit/odoo-addons", + "website": "https://github.com/NuoBiT/odoo-addons", "depends": [ "stock", ], diff --git a/stock_location_code/pyproject.toml b/stock_location_code/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_location_code/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_location_code/static/description/index.html b/stock_location_code/static/description/index.html index 7a912bf08..22d49c1ba 100644 --- a/stock_location_code/static/description/index.html +++ b/stock_location_code/static/description/index.html @@ -1,4 +1,3 @@ - @@ -370,7 +369,7 @@

Stock location code

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:fb4daa6640711b24250482d792adce131278b4e466510f937a5bec209a379689 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 nuobit/odoo-addons

+

Beta License: AGPL-3 NuoBiT/odoo-addons

This module adds unique code per company on location.

Table of contents

@@ -386,10 +385,10 @@

Stock location code

Bug Tracker

-

Bugs are tracked on GitHub Issues. +

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.

+feedback.

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

@@ -412,7 +411,7 @@

Contributors

Maintainers

-

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

+

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

You are welcome to contribute.

From 19c782a036b7bda424cc28da34de4bed685c78d1 Mon Sep 17 00:00:00 2001 From: ??? Date: Fri, 19 Sep 2025 11:50:11 +0200 Subject: [PATCH 8/8] [MIG] stock_location_code: Migration to 18.0 --- stock_location_code/__manifest__.py | 7 +++-- stock_location_code/i18n/es.po | 31 +++++++++++++++++++ stock_location_code/models/__init__.py | 2 +- .../models/{models.py => stock_location.py} | 7 +++-- .../views/stock_location_views.xml | 2 +- 5 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 stock_location_code/i18n/es.po rename stock_location_code/models/{models.py => stock_location.py} (58%) diff --git a/stock_location_code/__manifest__.py b/stock_location_code/__manifest__.py index d707f4389..b6d13dee6 100644 --- a/stock_location_code/__manifest__.py +++ b/stock_location_code/__manifest__.py @@ -1,5 +1,6 @@ -# Copyright NuoBiT - Eric Antones -# Copyright NuoBiT 2025 - Bijaya Kumal +# Copyright NuoBiT Solutions SL - Eric Antones +# Copyright 2025 NuoBiT Solutions SL - Bijaya Kumal +# Copyright 2025 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { @@ -7,7 +8,7 @@ "summary": "This module adds unique code per company on location", "author": "NuoBiT Solutions SL", "category": "Warehouse", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "website": "https://github.com/NuoBiT/odoo-addons", "depends": [ diff --git a/stock_location_code/i18n/es.po b/stock_location_code/i18n/es.po new file mode 100644 index 000000000..1a910677d --- /dev/null +++ b/stock_location_code/i18n/es.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_location_code +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-09-22 07:33+0000\n" +"PO-Revision-Date: 2025-09-22 07:33+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_code +#: model:ir.model.constraint,message:stock_location_code.constraint_stock_location_location_code_uniq +msgid "A code can only be assigned to one location per company!" +msgstr "¡Un código solo puede asignarse a una ubicación por empresa!" + +#. module: stock_location_code +#: model:ir.model.fields,field_description:stock_location_code.field_stock_location__code +msgid "Code" +msgstr "Código" + +#. module: stock_location_code +#: model:ir.model,name:stock_location_code.model_stock_location +msgid "Inventory Locations" +msgstr "Ubicaciones de inventario" diff --git a/stock_location_code/models/__init__.py b/stock_location_code/models/__init__.py index 0650744f6..88493e35d 100644 --- a/stock_location_code/models/__init__.py +++ b/stock_location_code/models/__init__.py @@ -1 +1 @@ -from . import models +from . import stock_location diff --git a/stock_location_code/models/models.py b/stock_location_code/models/stock_location.py similarity index 58% rename from stock_location_code/models/models.py rename to stock_location_code/models/stock_location.py index 0faef3d88..807be4ff5 100644 --- a/stock_location_code/models/models.py +++ b/stock_location_code/models/stock_location.py @@ -1,11 +1,12 @@ -# Copyright NuoBiT - Eric Antones -# Copyright NuoBiT 2025 - Bijaya Kumal +# Copyright NuoBiT Solutions SL - Eric Antones +# Copyright 2025 NuoBiT Solutions SL - Bijaya Kumal +# Copyright 2025 NuoBiT Solutions SL - Deniz Gallo # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import fields, models -class Location(models.Model): +class StockLocation(models.Model): _inherit = "stock.location" code = fields.Char() diff --git a/stock_location_code/views/stock_location_views.xml b/stock_location_code/views/stock_location_views.xml index d03359a67..54cc5e803 100644 --- a/stock_location_code/views/stock_location_views.xml +++ b/stock_location_code/views/stock_location_views.xml @@ -1,5 +1,5 @@ -