From 45ebfa642e625c67562e0b65696de757f90bf1dc Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 7 May 2026 08:35:51 +0000 Subject: [PATCH 1/7] [ADD] product_tag --- product_tag/README.rst | 74 ++++ product_tag/__init__.py | 1 + product_tag/__manifest__.py | 18 + product_tag/models/__init__.py | 3 + product_tag/models/product_product.py | 38 ++ product_tag/models/product_tag.py | 50 +++ product_tag/models/product_template.py | 13 + product_tag/readme/CONFIGURE.md | 2 + product_tag/readme/DESCRIPTION.md | 2 + product_tag/readme/USAGE.md | 4 + product_tag/security/ir.model.access.csv | 3 + product_tag/static/description/index.html | 434 +++++++++++++++++++ product_tag/views/product_tag_views.xml | 49 +++ product_tag/views/product_template_views.xml | 32 ++ product_tag/views/product_views.xml | 60 +++ 15 files changed, 783 insertions(+) create mode 100644 product_tag/README.rst create mode 100644 product_tag/__init__.py create mode 100644 product_tag/__manifest__.py create mode 100644 product_tag/models/__init__.py create mode 100644 product_tag/models/product_product.py create mode 100644 product_tag/models/product_tag.py create mode 100644 product_tag/models/product_template.py create mode 100644 product_tag/readme/CONFIGURE.md create mode 100644 product_tag/readme/DESCRIPTION.md create mode 100644 product_tag/readme/USAGE.md create mode 100644 product_tag/security/ir.model.access.csv create mode 100644 product_tag/static/description/index.html create mode 100644 product_tag/views/product_tag_views.xml create mode 100644 product_tag/views/product_template_views.xml create mode 100644 product_tag/views/product_views.xml diff --git a/product_tag/README.rst b/product_tag/README.rst new file mode 100644 index 00000000..161e3a5e --- /dev/null +++ b/product_tag/README.rst @@ -0,0 +1,74 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +=========== +Product Tag +=========== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:632ef97cd594c9321308526f1c31204b66bf00c20afb8179ab5aadeeab82637c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/license-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-qrtl%2Fmi7--custom-lightgray.png?logo=github + :target: https://github.com/qrtl/mi7-custom/tree/15.0/product_tag + :alt: qrtl/mi7-custom + +|badge1| |badge2| |badge3| + +This module backports the ``product.tag`` model from Odoo 16, allowing +products to be classified with tags in Odoo 15. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +- Go to *Sales → Products → Product Tags*. +- Create a tag by setting its *Name* and *Color*. + +Usage +===== + +- On a product template, set **Product Tags** to apply tags to all of + its variants. +- On a product variant, use **Additional Product Tags** to add tags + that apply only to that variant. + +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 +------- + +* Quartile + +Maintainers +----------- + +This module is part of the `qrtl/mi7-custom `_ project on GitHub. + +You are welcome to contribute. diff --git a/product_tag/__init__.py b/product_tag/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/product_tag/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/product_tag/__manifest__.py b/product_tag/__manifest__.py new file mode 100644 index 00000000..2c58849c --- /dev/null +++ b/product_tag/__manifest__.py @@ -0,0 +1,18 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +{ + "name": "Product Tag", + "category": "Product", + "version": "15.0.1.0.0", + "author": "Quartile", + "website": "https://www.quartile.co", + "license": "LGPL-3", + "depends": ["sale"], + "data": [ + "security/ir.model.access.csv", + "views/product_tag_views.xml", + "views/product_template_views.xml", + "views/product_views.xml", + ], + "installable": True, +} diff --git a/product_tag/models/__init__.py b/product_tag/models/__init__.py new file mode 100644 index 00000000..a102cc78 --- /dev/null +++ b/product_tag/models/__init__.py @@ -0,0 +1,3 @@ +from . import product_product +from . import product_tag +from . import product_template diff --git a/product_tag/models/product_product.py b/product_tag/models/product_product.py new file mode 100644 index 00000000..907c2520 --- /dev/null +++ b/product_tag/models/product_product.py @@ -0,0 +1,38 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + + +from odoo import api, fields, models +from odoo.osv import expression + + +class ProductProduct(models.Model): + _inherit = "product.product" + + additional_product_tag_ids = fields.Many2many( + "product.tag", "product_tag_product_product_rel" + ) + all_product_tag_ids = fields.Many2many( + "product.tag", + compute="_compute_all_product_tag_ids", + search="_search_all_product_tag_ids", + ) + + @api.depends("product_tag_ids", "additional_product_tag_ids") + def _compute_all_product_tag_ids(self): + for product in self: + product.all_product_tag_ids = ( + product.product_tag_ids | product.additional_product_tag_ids + ) + + def _search_all_product_tag_ids(self, operator, operand): + if operator in expression.NEGATIVE_TERM_OPERATORS: + return [ + ("product_tag_ids", operator, operand), + ("additional_product_tag_ids", operator, operand), + ] + return [ + "|", + ("product_tag_ids", operator, operand), + ("additional_product_tag_ids", operator, operand), + ] diff --git a/product_tag/models/product_tag.py b/product_tag/models/product_tag.py new file mode 100644 index 00000000..b22e1a9f --- /dev/null +++ b/product_tag/models/product_tag.py @@ -0,0 +1,50 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from random import randint + +from odoo import api, fields, models +from odoo.osv import expression + + +class ProductTag(models.Model): + _name = "product.tag" + _description = "Product Tag" + + def _get_default_color(self): + return randint(1, 11) + + name = fields.Char("Tag Name", required=True, translate=True) + color = fields.Integer(default=_get_default_color) + product_template_ids = fields.Many2many( + "product.template", "product_tag_product_template_rel" + ) + product_product_ids = fields.Many2many( + "product.product", "product_tag_product_product_rel" + ) + product_ids = fields.Many2many( + "product.product", compute="_compute_product_ids", search="_search_product_ids" + ) + + _sql_constraints = [ + ("name_uniq", "unique (name)", "Tag name already exists !"), + ] + + @api.depends("product_template_ids", "product_product_ids") + def _compute_product_ids(self): + for tag in self: + tag.product_ids = ( + tag.product_template_ids.product_variant_ids | tag.product_product_ids + ) + + def _search_product_ids(self, operator, operand): + if operator in expression.NEGATIVE_TERM_OPERATORS: + return [ + ("product_template_ids.product_variant_ids", operator, operand), + ("product_product_ids", operator, operand), + ] + return [ + "|", + ("product_template_ids.product_variant_ids", operator, operand), + ("product_product_ids", operator, operand), + ] diff --git a/product_tag/models/product_template.py b/product_tag/models/product_template.py new file mode 100644 index 00000000..fbfd3eda --- /dev/null +++ b/product_tag/models/product_template.py @@ -0,0 +1,13 @@ +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + + +from odoo import fields, models + + +class ProductTemplate(models.Model): + _inherit = "product.template" + + product_tag_ids = fields.Many2many( + "product.tag", "product_tag_product_template_rel", string="Product Tags" + ) diff --git a/product_tag/readme/CONFIGURE.md b/product_tag/readme/CONFIGURE.md new file mode 100644 index 00000000..647bb55d --- /dev/null +++ b/product_tag/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +- Go to *Sales → Products → Product Tags*. +- Create a tag by setting its *Name* and *Color*. diff --git a/product_tag/readme/DESCRIPTION.md b/product_tag/readme/DESCRIPTION.md new file mode 100644 index 00000000..7d4cced6 --- /dev/null +++ b/product_tag/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module backports the ``product.tag`` model from Odoo 16, allowing +products to be classified with tags in Odoo 15. diff --git a/product_tag/readme/USAGE.md b/product_tag/readme/USAGE.md new file mode 100644 index 00000000..9e7c6ad7 --- /dev/null +++ b/product_tag/readme/USAGE.md @@ -0,0 +1,4 @@ +* On a product template, set **Product Tags** to apply tags to all of its + variants. +* On a product variant, use **Additional Product Tags** to add tags that + apply only to that variant. diff --git a/product_tag/security/ir.model.access.csv b/product_tag/security/ir.model.access.csv new file mode 100644 index 00000000..cf961d93 --- /dev/null +++ b/product_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_product_tag_user,product.tag.user,model_product_tag,base.group_user,1,0,0,0 +access_product_tag_manager,product.tag.manager,model_product_tag,base.group_system,1,1,1,1 diff --git a/product_tag/static/description/index.html b/product_tag/static/description/index.html new file mode 100644 index 00000000..bd50f15c --- /dev/null +++ b/product_tag/static/description/index.html @@ -0,0 +1,434 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Product Tag

+ +

Beta License: LGPL-3 qrtl/mi7-custom

+

This module backports the product.tag model from Odoo 16, allowing +products to be classified with tags in Odoo 15.

+

Table of contents

+ +
+

Configuration

+
    +
  • Go to Sales → Products → Product Tags.
  • +
  • Create a tag by setting its Name and Color.
  • +
+
+
+

Usage

+
    +
  • On a product template, set Product Tags to apply tags to all of +its variants.
  • +
  • On a product variant, use Additional Product Tags to add tags +that apply only to that variant.
  • +
+
+
+

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

+
    +
  • Quartile
  • +
+
+
+

Maintainers

+

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

+

You are welcome to contribute.

+
+
+
+
+ + diff --git a/product_tag/views/product_tag_views.xml b/product_tag/views/product_tag_views.xml new file mode 100644 index 00000000..6628e64e --- /dev/null +++ b/product_tag/views/product_tag_views.xml @@ -0,0 +1,49 @@ + + + + product.tag.form + product.tag + +
+ + + + + + + + + + + +
+
+
+ + product.tag.tree + product.tag + + + + + + + + + Product Tags + ir.actions.act_window + product.tag + tree,form + + +
diff --git a/product_tag/views/product_template_views.xml b/product_tag/views/product_template_views.xml new file mode 100644 index 00000000..209fcc4c --- /dev/null +++ b/product_tag/views/product_template_views.xml @@ -0,0 +1,32 @@ + + + + product.template.form + product.template + + + + + + + + + product.template.tree + product.template + + + + + + + + diff --git a/product_tag/views/product_views.xml b/product_tag/views/product_views.xml new file mode 100644 index 00000000..e6f1b4f0 --- /dev/null +++ b/product_tag/views/product_views.xml @@ -0,0 +1,60 @@ + + + + product.product.form + product.product + + + + {'no_open': True, 'color_field': 'color'} + + + + + + + + product.product.form + product.product + + + + + + + + + + + + product.product.tree + product.product + + + + + + + + From 43375fabb3a8150810f8c105e81bdf40f850a63f Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 7 May 2026 08:54:30 +0000 Subject: [PATCH 2/7] fixup --- product_tag/__manifest__.py | 3 +-- product_tag/models/product_product.py | 4 +--- product_tag/models/product_tag.py | 3 +-- product_tag/models/product_template.py | 4 +--- product_tag/readme/DESCRIPTION.md | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/product_tag/__manifest__.py b/product_tag/__manifest__.py index 2c58849c..7f675869 100644 --- a/product_tag/__manifest__.py +++ b/product_tag/__manifest__.py @@ -1,5 +1,4 @@ -# Copyright 2026 Quartile (https://www.quartile.co) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +# Part of Odoo. See LICENSE file for full copyright and licensing details. { "name": "Product Tag", "category": "Product", diff --git a/product_tag/models/product_product.py b/product_tag/models/product_product.py index 907c2520..f6279c23 100644 --- a/product_tag/models/product_product.py +++ b/product_tag/models/product_product.py @@ -1,6 +1,4 @@ -# Copyright 2026 Quartile (https://www.quartile.co) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - +# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression diff --git a/product_tag/models/product_tag.py b/product_tag/models/product_tag.py index b22e1a9f..d5ac29fe 100644 --- a/product_tag/models/product_tag.py +++ b/product_tag/models/product_tag.py @@ -1,5 +1,4 @@ -# Copyright 2026 Quartile (https://www.quartile.co) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +# Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint diff --git a/product_tag/models/product_template.py b/product_tag/models/product_template.py index fbfd3eda..8e85d5af 100644 --- a/product_tag/models/product_template.py +++ b/product_tag/models/product_template.py @@ -1,6 +1,4 @@ -# Copyright 2026 Quartile (https://www.quartile.co) -# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). - +# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models diff --git a/product_tag/readme/DESCRIPTION.md b/product_tag/readme/DESCRIPTION.md index 7d4cced6..391b76a8 100644 --- a/product_tag/readme/DESCRIPTION.md +++ b/product_tag/readme/DESCRIPTION.md @@ -1,2 +1,2 @@ -This module backports the ``product.tag`` model from Odoo 16, allowing +This module backports the `product.tag` model from Odoo 16, allowing products to be classified with tags in Odoo 15. From 1ffd7aeb493e1093af15f1389081beb04ac4f40e Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 7 May 2026 08:55:39 +0000 Subject: [PATCH 3/7] fixup --- product_tag/__manifest__.py | 2 +- product_tag/models/product_product.py | 2 +- product_tag/models/product_tag.py | 2 +- product_tag/models/product_template.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/product_tag/__manifest__.py b/product_tag/__manifest__.py index 7f675869..ea5968ef 100644 --- a/product_tag/__manifest__.py +++ b/product_tag/__manifest__.py @@ -1,4 +1,4 @@ -# Part of Odoo. See LICENSE file for full copyright and licensing details. +# Part of Odoo. { "name": "Product Tag", "category": "Product", diff --git a/product_tag/models/product_product.py b/product_tag/models/product_product.py index f6279c23..1b3a5075 100644 --- a/product_tag/models/product_product.py +++ b/product_tag/models/product_product.py @@ -1,4 +1,4 @@ -# Part of Odoo. See LICENSE file for full copyright and licensing details. +# Part of Odoo. from odoo import api, fields, models from odoo.osv import expression diff --git a/product_tag/models/product_tag.py b/product_tag/models/product_tag.py index d5ac29fe..e4ba6fb4 100644 --- a/product_tag/models/product_tag.py +++ b/product_tag/models/product_tag.py @@ -1,4 +1,4 @@ -# Part of Odoo. See LICENSE file for full copyright and licensing details. +# Part of Odoo. from random import randint diff --git a/product_tag/models/product_template.py b/product_tag/models/product_template.py index 8e85d5af..f15b38d6 100644 --- a/product_tag/models/product_template.py +++ b/product_tag/models/product_template.py @@ -1,4 +1,4 @@ -# Part of Odoo. See LICENSE file for full copyright and licensing details. +# Part of Odoo. from odoo import fields, models From cf8a885aeffa85b49334d0d31814924ff1c1a7c8 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Thu, 7 May 2026 09:13:49 +0000 Subject: [PATCH 4/7] fixup --- product_tag/README.rst | 2 -- product_tag/models/__init__.py | 1 - product_tag/models/product_product.py | 36 ----------------------- product_tag/models/product_tag.py | 28 +----------------- product_tag/readme/USAGE.md | 2 -- product_tag/static/description/index.html | 2 -- product_tag/views/product_tag_views.xml | 4 +-- product_tag/views/product_views.xml | 32 +------------------- 8 files changed, 4 insertions(+), 103 deletions(-) delete mode 100644 product_tag/models/product_product.py diff --git a/product_tag/README.rst b/product_tag/README.rst index 161e3a5e..53c60f02 100644 --- a/product_tag/README.rst +++ b/product_tag/README.rst @@ -45,8 +45,6 @@ Usage - On a product template, set **Product Tags** to apply tags to all of its variants. -- On a product variant, use **Additional Product Tags** to add tags - that apply only to that variant. Bug Tracker =========== diff --git a/product_tag/models/__init__.py b/product_tag/models/__init__.py index a102cc78..a898be3b 100644 --- a/product_tag/models/__init__.py +++ b/product_tag/models/__init__.py @@ -1,3 +1,2 @@ -from . import product_product from . import product_tag from . import product_template diff --git a/product_tag/models/product_product.py b/product_tag/models/product_product.py deleted file mode 100644 index 1b3a5075..00000000 --- a/product_tag/models/product_product.py +++ /dev/null @@ -1,36 +0,0 @@ -# Part of Odoo. - -from odoo import api, fields, models -from odoo.osv import expression - - -class ProductProduct(models.Model): - _inherit = "product.product" - - additional_product_tag_ids = fields.Many2many( - "product.tag", "product_tag_product_product_rel" - ) - all_product_tag_ids = fields.Many2many( - "product.tag", - compute="_compute_all_product_tag_ids", - search="_search_all_product_tag_ids", - ) - - @api.depends("product_tag_ids", "additional_product_tag_ids") - def _compute_all_product_tag_ids(self): - for product in self: - product.all_product_tag_ids = ( - product.product_tag_ids | product.additional_product_tag_ids - ) - - def _search_all_product_tag_ids(self, operator, operand): - if operator in expression.NEGATIVE_TERM_OPERATORS: - return [ - ("product_tag_ids", operator, operand), - ("additional_product_tag_ids", operator, operand), - ] - return [ - "|", - ("product_tag_ids", operator, operand), - ("additional_product_tag_ids", operator, operand), - ] diff --git a/product_tag/models/product_tag.py b/product_tag/models/product_tag.py index e4ba6fb4..06b2e4e1 100644 --- a/product_tag/models/product_tag.py +++ b/product_tag/models/product_tag.py @@ -2,8 +2,7 @@ from random import randint -from odoo import api, fields, models -from odoo.osv import expression +from odoo import fields, models class ProductTag(models.Model): @@ -18,32 +17,7 @@ def _get_default_color(self): product_template_ids = fields.Many2many( "product.template", "product_tag_product_template_rel" ) - product_product_ids = fields.Many2many( - "product.product", "product_tag_product_product_rel" - ) - product_ids = fields.Many2many( - "product.product", compute="_compute_product_ids", search="_search_product_ids" - ) _sql_constraints = [ ("name_uniq", "unique (name)", "Tag name already exists !"), ] - - @api.depends("product_template_ids", "product_product_ids") - def _compute_product_ids(self): - for tag in self: - tag.product_ids = ( - tag.product_template_ids.product_variant_ids | tag.product_product_ids - ) - - def _search_product_ids(self, operator, operand): - if operator in expression.NEGATIVE_TERM_OPERATORS: - return [ - ("product_template_ids.product_variant_ids", operator, operand), - ("product_product_ids", operator, operand), - ] - return [ - "|", - ("product_template_ids.product_variant_ids", operator, operand), - ("product_product_ids", operator, operand), - ] diff --git a/product_tag/readme/USAGE.md b/product_tag/readme/USAGE.md index 9e7c6ad7..08d2691f 100644 --- a/product_tag/readme/USAGE.md +++ b/product_tag/readme/USAGE.md @@ -1,4 +1,2 @@ * On a product template, set **Product Tags** to apply tags to all of its variants. -* On a product variant, use **Additional Product Tags** to add tags that - apply only to that variant. diff --git a/product_tag/static/description/index.html b/product_tag/static/description/index.html index bd50f15c..d75e4540 100644 --- a/product_tag/static/description/index.html +++ b/product_tag/static/description/index.html @@ -402,8 +402,6 @@

Usage

  • On a product template, set Product Tags to apply tags to all of its variants.
  • -
  • On a product variant, use Additional Product Tags to add tags -that apply only to that variant.
diff --git a/product_tag/views/product_tag_views.xml b/product_tag/views/product_tag_views.xml index 6628e64e..22afa990 100644 --- a/product_tag/views/product_tag_views.xml +++ b/product_tag/views/product_tag_views.xml @@ -14,9 +14,9 @@ diff --git a/product_tag/views/product_views.xml b/product_tag/views/product_views.xml index e6f1b4f0..745bfddb 100644 --- a/product_tag/views/product_views.xml +++ b/product_tag/views/product_views.xml @@ -10,36 +10,6 @@ name="options" >{'no_open': True, 'color_field': 'color'} - - - - - - - product.product.form - product.product - - - - - - - - @@ -49,7 +19,7 @@ Date: Thu, 7 May 2026 09:20:49 +0000 Subject: [PATCH 5/7] add setup --- product_tag/README.rst | 2 +- product_tag/readme/CONFIGURE.md | 2 +- product_tag/static/description/index.html | 2 +- product_tag/views/product_tag_views.xml | 2 +- product_tag/views/product_views.xml | 14 +------------- setup/product_tag/odoo/addons/product_tag | 1 + setup/product_tag/setup.py | 6 ++++++ 7 files changed, 12 insertions(+), 17 deletions(-) create mode 120000 setup/product_tag/odoo/addons/product_tag create mode 100644 setup/product_tag/setup.py diff --git a/product_tag/README.rst b/product_tag/README.rst index 53c60f02..8ced34d2 100644 --- a/product_tag/README.rst +++ b/product_tag/README.rst @@ -37,7 +37,7 @@ products to be classified with tags in Odoo 15. Configuration ============= -- Go to *Sales → Products → Product Tags*. +- Go to *Sales → Configuration → Product Tags*. - Create a tag by setting its *Name* and *Color*. Usage diff --git a/product_tag/readme/CONFIGURE.md b/product_tag/readme/CONFIGURE.md index 647bb55d..49149fba 100644 --- a/product_tag/readme/CONFIGURE.md +++ b/product_tag/readme/CONFIGURE.md @@ -1,2 +1,2 @@ -- Go to *Sales → Products → Product Tags*. +- Go to *Sales → Configuration → Product Tags*. - Create a tag by setting its *Name* and *Color*. diff --git a/product_tag/static/description/index.html b/product_tag/static/description/index.html index d75e4540..a340e89b 100644 --- a/product_tag/static/description/index.html +++ b/product_tag/static/description/index.html @@ -393,7 +393,7 @@

Product Tag

Configuration

    -
  • Go to Sales → Products → Product Tags.
  • +
  • Go to Sales → Configuration → Product Tags.
  • Create a tag by setting its Name and Color.
diff --git a/product_tag/views/product_tag_views.xml b/product_tag/views/product_tag_views.xml index 22afa990..40df9b5c 100644 --- a/product_tag/views/product_tag_views.xml +++ b/product_tag/views/product_tag_views.xml @@ -42,7 +42,7 @@ diff --git a/product_tag/views/product_views.xml b/product_tag/views/product_views.xml index 745bfddb..4568d33b 100644 --- a/product_tag/views/product_views.xml +++ b/product_tag/views/product_views.xml @@ -1,17 +1,5 @@ - - product.product.form - product.product - - - - {'no_open': True, 'color_field': 'color'} - - - product.product.tree product.product @@ -21,7 +9,7 @@ diff --git a/setup/product_tag/odoo/addons/product_tag b/setup/product_tag/odoo/addons/product_tag new file mode 120000 index 00000000..4c12bd50 --- /dev/null +++ b/setup/product_tag/odoo/addons/product_tag @@ -0,0 +1 @@ +../../../../product_tag \ No newline at end of file diff --git a/setup/product_tag/setup.py b/setup/product_tag/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/product_tag/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 2b0dda30cfaeb0a931bb6ba0d7f3c8d54e306ba0 Mon Sep 17 00:00:00 2001 From: Aungkokolin1997 Date: Mon, 1 Jun 2026 01:51:09 +0000 Subject: [PATCH 6/7] upd copyright and readme --- product_tag/README.rst | 5 +++++ product_tag/__manifest__.py | 4 +++- product_tag/models/product_tag.py | 4 +++- product_tag/models/product_template.py | 4 +++- product_tag/readme/DESCRIPTION.md | 4 ++++ product_tag/static/description/index.html | 4 ++++ 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/product_tag/README.rst b/product_tag/README.rst index 8ced34d2..ca8d1c9c 100644 --- a/product_tag/README.rst +++ b/product_tag/README.rst @@ -29,6 +29,11 @@ Product Tag This module backports the ``product.tag`` model from Odoo 16, allowing products to be classified with tags in Odoo 15. +Unlike the original Odoo 16 design, the implementation has been +simplified: tags can only be assigned at the product template +(``product.template``) level, and not at the product variant +(``product.product``) level. + **Table of contents** .. contents:: diff --git a/product_tag/__manifest__.py b/product_tag/__manifest__.py index ea5968ef..d9c06f18 100644 --- a/product_tag/__manifest__.py +++ b/product_tag/__manifest__.py @@ -1,4 +1,6 @@ -# Part of Odoo. +# Copyright Odoo S.A. +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). { "name": "Product Tag", "category": "Product", diff --git a/product_tag/models/product_tag.py b/product_tag/models/product_tag.py index 06b2e4e1..aebc2e70 100644 --- a/product_tag/models/product_tag.py +++ b/product_tag/models/product_tag.py @@ -1,4 +1,6 @@ -# Part of Odoo. +# Copyright Odoo S.A. +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). from random import randint diff --git a/product_tag/models/product_template.py b/product_tag/models/product_template.py index f15b38d6..c662029e 100644 --- a/product_tag/models/product_template.py +++ b/product_tag/models/product_template.py @@ -1,4 +1,6 @@ -# Part of Odoo. +# Copyright Odoo S.A. +# Copyright 2026 Quartile (https://www.quartile.co) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). from odoo import fields, models diff --git a/product_tag/readme/DESCRIPTION.md b/product_tag/readme/DESCRIPTION.md index 391b76a8..b63ed6cd 100644 --- a/product_tag/readme/DESCRIPTION.md +++ b/product_tag/readme/DESCRIPTION.md @@ -1,2 +1,6 @@ This module backports the `product.tag` model from Odoo 16, allowing products to be classified with tags in Odoo 15. + +Unlike the original Odoo 16 design, the implementation has been simplified: tags can +only be assigned at the product template (`product.template`) level, and not at the +product variant (`product.product`) level. diff --git a/product_tag/static/description/index.html b/product_tag/static/description/index.html index a340e89b..1d75684f 100644 --- a/product_tag/static/description/index.html +++ b/product_tag/static/description/index.html @@ -377,6 +377,10 @@

Product Tag

Beta License: LGPL-3 qrtl/mi7-custom

This module backports the product.tag model from Odoo 16, allowing products to be classified with tags in Odoo 15.

+

Unlike the original Odoo 16 design, the implementation has been +simplified: tags can only be assigned at the product template +(product.template) level, and not at the product variant +(product.product) level.

Table of contents

    From 626fdb1800e5690583e2b70bde1027186058ddc4 Mon Sep 17 00:00:00 2001 From: Morita Shinnosuke Date: Thu, 4 Jun 2026 08:47:54 +0000 Subject: [PATCH 7/7] add translation --- product_tag/i18n/ja.po | 86 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 product_tag/i18n/ja.po diff --git a/product_tag/i18n/ja.po b/product_tag/i18n/ja.po new file mode 100644 index 00000000..425d4717 --- /dev/null +++ b/product_tag/i18n/ja.po @@ -0,0 +1,86 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * product_tag +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-06-04 08:42+0000\n" +"PO-Revision-Date: 2026-06-04 08:42+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: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__color +msgid "Color" +msgstr "色" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__create_uid +msgid "Created by" +msgstr "作成者" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__create_date +msgid "Created on" +msgstr "作成日" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__display_name +msgid "Display Name" +msgstr "表示名" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__id +msgid "ID" +msgstr "ID" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag____last_update +msgid "Last Modified on" +msgstr "最終更新日" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__write_uid +msgid "Last Updated by" +msgstr "最終更新者" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__write_date +msgid "Last Updated on" +msgstr "最終更新日" + +#. module: product_tag +#: model:ir.model,name:product_tag.model_product_tag +#: model_terms:ir.ui.view,arch_db:product_tag.product_tag_form_view +msgid "Product Tag" +msgstr "製品カテゴリ" + +#. module: product_tag +#: model:ir.actions.act_window,name:product_tag.product_tag_action +#: model:ir.model.fields,field_description:product_tag.field_product_product__product_tag_ids +#: model:ir.model.fields,field_description:product_tag.field_product_template__product_tag_ids +#: model:ir.ui.menu,name:product_tag.product_tag_menu +msgid "Product Tags" +msgstr "製品カテゴリ" + +#. module: product_tag +#: model:ir.model,name:product_tag.model_product_template +#: model:ir.model.fields,field_description:product_tag.field_product_tag__product_template_ids +msgid "Product Template" +msgstr "プロダクトテンプレート" + +#. module: product_tag +#: model:ir.model.fields,field_description:product_tag.field_product_tag__name +msgid "Tag Name" +msgstr "カテゴリ名" + +#. module: product_tag +#: model:ir.model.constraint,message:product_tag.constraint_product_tag_name_uniq +msgid "Tag name already exists !" +msgstr "カテゴリ名がすでに存在します!"