Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions product_tag/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
.. 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.

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::
:local:

Configuration
=============

- Go to *Sales → Configuration → 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.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/mi7-custom/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 <https://github.com/qrtl/mi7-custom/issues/new?body=module:%20product_tag%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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 <https://github.com/qrtl/mi7-custom/tree/15.0/product_tag>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions product_tag/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions product_tag/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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",
"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,
}
86 changes: 86 additions & 0 deletions product_tag/i18n/ja.po
Original file line number Diff line number Diff line change
@@ -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 "カテゴリ名がすでに存在します!"
2 changes: 2 additions & 0 deletions product_tag/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import product_tag
from . import product_template
25 changes: 25 additions & 0 deletions product_tag/models/product_tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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

from odoo import fields, models


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"
)

_sql_constraints = [
("name_uniq", "unique (name)", "Tag name already exists !"),
]
13 changes: 13 additions & 0 deletions product_tag/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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


class ProductTemplate(models.Model):
_inherit = "product.template"

product_tag_ids = fields.Many2many(
"product.tag", "product_tag_product_template_rel", string="Product Tags"
)
2 changes: 2 additions & 0 deletions product_tag/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Go to *Sales → Configuration → Product Tags*.
- Create a tag by setting its *Name* and *Color*.
6 changes: 6 additions & 0 deletions product_tag/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This module backports the `product.tag` model from Odoo 16, allowing
products to be classified with tags in Odoo 15.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
products to be classified with tags in Odoo 15.
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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


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.
2 changes: 2 additions & 0 deletions product_tag/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* On a product template, set **Product Tags** to apply tags to all of its
variants.
3 changes: 3 additions & 0 deletions product_tag/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -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
Loading
Loading