diff --git a/odoo_product_tags/README.rst b/odoo_product_tags/README.rst
index 40a63a1ea..6e544ebd9 100644
--- a/odoo_product_tags/README.rst
+++ b/odoo_product_tags/README.rst
@@ -1,11 +1,16 @@
+.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
+ :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
+ :alt: License: LGPL-3
+
Odoo Product Tags
=======
* Odoo Product Tags module for Odoo 16.
+
Installation
============
- - www.odoo.com/documentation/16.0/setup/install.html
- - Install our custom addon
+ - www.odoo.com/documentation/16.0/setup/install.html
+ - Install our custom addon
License
-------
@@ -14,15 +19,16 @@ General Public License, Version 3 (LGPL v3).
Company
-------
-* 'Cybrosys Techno Solutions '__
+* `Cybrosys Techno Solutions `__
Credits
-------
-* 'Cybrosys Techno Solutions '__
+* Developer: Cybrosys
Contacts
--------
* Mail Contact : odoo@cybrosys.com
+* Website : https://cybrosys.com
Bug Tracker
-----------
@@ -30,6 +36,8 @@ Bugs are tracked on GitHub Issues. In case of trouble, please check there if you
Maintainer
==========
+.. image:: https://cybrosys.com/images/logo.png
+ :target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit https://www.cybrosys.com
diff --git a/odoo_product_tags/__manifest__.py b/odoo_product_tags/__manifest__.py
index f2762e457..9afb42192 100644
--- a/odoo_product_tags/__manifest__.py
+++ b/odoo_product_tags/__manifest__.py
@@ -21,7 +21,7 @@
#############################################################################
{
'name': "Odoo Product Tags",
- 'version': '16.0.1.0.0',
+ 'version': '16.0.2.0.1',
'summary': """Odoo Product Tags""",
"category": 'Inventory',
'description': """Module helps to manage products easily using tags.""",
@@ -32,8 +32,8 @@
'depends': ['base', 'sale', 'sale_management'],
'data': [
'security/ir.model.access.csv',
- 'views/product_tags_views.xml',
'views/product_template_views.xml',
+ 'views/product_product_views.xml',
'views/res_config_settings_views.xml',
'wizard/wizard.xml',
],
@@ -41,5 +41,5 @@
'license': "LGPL-3",
'installable': True,
'auto_install': False,
- 'application': True
+ 'application': False
}
diff --git a/odoo_product_tags/doc/RELEASE_NOTES.md b/odoo_product_tags/doc/RELEASE_NOTES.md
index 8f49544a6..aba4ce372 100644
--- a/odoo_product_tags/doc/RELEASE_NOTES.md
+++ b/odoo_product_tags/doc/RELEASE_NOTES.md
@@ -3,4 +3,10 @@
#### 21.01.2023
#### Version 16.0.1.0.0
#### ADD
-- Initial commit for Odoo Product Tags
\ No newline at end of file
+- Initial commit for Odoo Product Tags
+
+
+#### 05.04.2023
+#### Version 16.0.2.0.1
+#### UPDT
+- Made changes to depends on odoo16's default workflow
diff --git a/odoo_product_tags/models/__init__.py b/odoo_product_tags/models/__init__.py
index 165801a7e..02c5b6a0a 100644
--- a/odoo_product_tags/models/__init__.py
+++ b/odoo_product_tags/models/__init__.py
@@ -21,6 +21,6 @@
#############################################################################
from . import res_config_settings
-from . import product_tags
from . import product_template
+from . import product_product
diff --git a/odoo_product_tags/models/product_product.py b/odoo_product_tags/models/product_product.py
new file mode 100644
index 000000000..ed1e3d2ba
--- /dev/null
+++ b/odoo_product_tags/models/product_product.py
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+#############################################################################
+#
+# Cybrosys Technologies Pvt. Ltd.
+#
+# Copyright (C) 2023-TODAY Cybrosys Technologies()
+# Author: Cybrosys Techno Solutions()
+#
+# You can modify it under the terms of the GNU LESSER
+# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
+#
+# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
+# (LGPL v3) along with this program.
+# If not, see .
+#
+#############################################################################
+import ast
+from odoo import api, fields, models, _
+
+
+class ProductProduct(models.Model):
+ _inherit = 'product.product'
+
+ @api.model
+ def create(self, vals):
+ """Inherited for passing the product Tags."""
+ res = super(ProductProduct, self).create(vals)
+ if not res.product_tag_ids:
+ pro_tag = self.env['ir.config_parameter'].sudo().get_param(
+ 'odoo_product_tags.product_tag_ids')
+ if pro_tag:
+ tag_ids = ast.literal_eval(pro_tag)
+ res.update({
+ "product_tag_ids": [(6, 0, tag_ids)],
+ })
+ return res
+ else:
+ return res
+
+ def action_apply_product_tags(self):
+ """Applying product tags"""
+ return {
+ 'name': 'Apply Product Tag',
+ 'type': 'ir.actions.act_window',
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'product.tags.wizard',
+ 'context': {
+ 'default_product_ids': self.ids,
+ 'default_is_product': True
+ },
+ 'target': 'new',
+ }
diff --git a/odoo_product_tags/models/product_tags.py b/odoo_product_tags/models/product_tags.py
deleted file mode 100644
index 108b15d7c..000000000
--- a/odoo_product_tags/models/product_tags.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-#############################################################################
-#
-# Cybrosys Technologies Pvt. Ltd.
-#
-# Copyright (C) 2023-TODAY Cybrosys Technologies()
-# Author: Cybrosys Techno Solutions()
-#
-# You can modify it under the terms of the GNU LESSER
-# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
-#
-# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
-# (LGPL v3) along with this program.
-# If not, see .
-#
-#############################################################################
-from odoo import api, fields, models, _
-from random import randint
-
-
-class ProductTags(models.Model):
- _name = "product.tags"
- _description = 'Product Tags'
- _rec_name = "name"
- _inherit = ['mail.thread', 'mail.activity.mixin']
-
- def _random_color(self):
- return randint(1, 11)
-
- name = fields.Char(required=1, copy=False, string='Name')
- description = fields.Text(string='Description', translate=True)
- tag_color = fields.Integer(string="Tag Color", default=_random_color)
- product_tmpl_ids = fields.Many2many('product.template', string="Products")
-
diff --git a/odoo_product_tags/models/product_template.py b/odoo_product_tags/models/product_template.py
index 955bd04fa..302b2c604 100644
--- a/odoo_product_tags/models/product_template.py
+++ b/odoo_product_tags/models/product_template.py
@@ -26,27 +26,24 @@ import ast
class ProductTemplate(models.Model):
_inherit = 'product.template'
- product_tags_ids = fields.Many2many(
- "product.tags", string="Product Tags", help="Product Tags")
-
@api.model
def create(self, vals):
"""Inherited for passing the product Tags."""
res = super(ProductTemplate, self).create(vals)
- if not res.product_tags_ids:
+ if not res.product_tag_ids:
pro_tag = self.env['ir.config_parameter'].sudo().get_param(
- 'odoo_product_tags.product_tags_ids')
+ 'odoo_product_tags.product_tag_ids')
if pro_tag:
tag_ids = ast.literal_eval(pro_tag)
res.update({
- "product_tags_ids": [(6, 0, tag_ids)],
+ "product_tag_ids": [(6, 0, tag_ids)],
})
return res
else:
return res
- def action_apply_tags(self):
+ def action_apply_template_tags(self):
return {
'name': 'Apply Product Tag',
'type': 'ir.actions.act_window',
@@ -54,7 +51,8 @@ class ProductTemplate(models.Model):
'view_mode': 'form',
'res_model': 'product.tags.wizard',
'context': {
- 'default_product_ids': self.ids,
+ 'default_product_tmp_ids': self.ids,
+ 'default_is_product_template': True
},
'target': 'new',
}
diff --git a/odoo_product_tags/models/res_config_settings.py b/odoo_product_tags/models/res_config_settings.py
index cd4746212..b45943584 100644
--- a/odoo_product_tags/models/res_config_settings.py
+++ b/odoo_product_tags/models/res_config_settings.py
@@ -19,34 +19,36 @@
# If not, see .
#
#############################################################################
-from odoo import api, fields, models, _
from ast import literal_eval
+from odoo import api, fields, models, _
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
- product_tags_ids = fields.Many2many(
- 'product.tags', string='Default Product Tags')
+ product_tag_ids = fields.Many2many(
+ 'product.tag', string='Default Product Tags')
def set_values(self):
+ """ save values in the settings product tag fields"""
res = super(ResConfigSettings, self).set_values()
self.env['ir.config_parameter'].set_param(
- 'odoo_product_tags.product_tags_ids',
- self.product_tags_ids.ids)
+ 'odoo_product_tags.product_tag_ids',
+ self.product_tag_ids.ids)
return res
@api.model
def get_values(self):
+ """ Get values for product tag fields in the settings
+ and assign the value to that fields"""
res = super(ResConfigSettings, self).get_values()
params = self.env['ir.config_parameter'].sudo()
pro_tag_ids = params.get_param(
- 'odoo_product_tags.product_tags_ids')
+ 'odoo_product_tags.product_tag_ids')
if pro_tag_ids:
res.update(
- product_tags_ids=[(6, 0, literal_eval(
+ product_tag_ids=[(6, 0, literal_eval(
pro_tag_ids))] if pro_tag_ids else False)
return res
else:
return res
-
diff --git a/odoo_product_tags/security/ir.model.access.csv b/odoo_product_tags/security/ir.model.access.csv
index 15d2208b2..6c26d9cb7 100644
--- a/odoo_product_tags/security/ir.model.access.csv
+++ b/odoo_product_tags/security/ir.model.access.csv
@@ -1,3 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_product_tags,product.tags,model_product_tags,base.group_user,1,1,1,1
access_product_tags_wizard,product.tags.wizard,model_product_tags_wizard,base.group_user,1,1,1,1
diff --git a/odoo_product_tags/static/description/assets/modules/approval_image.png b/odoo_product_tags/static/description/assets/modules/approval_image.png
deleted file mode 100644
index 84fe94e80..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/approval_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/assets/modules/budget_image.png b/odoo_product_tags/static/description/assets/modules/budget_image.png
deleted file mode 100644
index fe6aa6fe4..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/budget_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/assets/modules/export_image.png b/odoo_product_tags/static/description/assets/modules/export_image.png
deleted file mode 100644
index 4e4ea0e51..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/export_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/assets/modules/magento_image.png b/odoo_product_tags/static/description/assets/modules/magento_image.png
deleted file mode 100644
index 39de0820f..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/magento_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/assets/modules/module01.png b/odoo_product_tags/static/description/assets/modules/module01.png
new file mode 100644
index 000000000..a9936f593
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module01.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/module02.png b/odoo_product_tags/static/description/assets/modules/module02.png
new file mode 100644
index 000000000..1a9e2cbd7
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module02.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/module03.png b/odoo_product_tags/static/description/assets/modules/module03.png
new file mode 100644
index 000000000..d3d28e08b
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module03.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/module04.png b/odoo_product_tags/static/description/assets/modules/module04.png
new file mode 100644
index 000000000..5297b364a
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module04.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/module05.png b/odoo_product_tags/static/description/assets/modules/module05.png
new file mode 100644
index 000000000..2263f673e
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module05.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/module06.png b/odoo_product_tags/static/description/assets/modules/module06.png
new file mode 100644
index 000000000..0b8c68699
Binary files /dev/null and b/odoo_product_tags/static/description/assets/modules/module06.png differ
diff --git a/odoo_product_tags/static/description/assets/modules/pos_image.png b/odoo_product_tags/static/description/assets/modules/pos_image.png
deleted file mode 100644
index c5932894b..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/pos_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/assets/modules/shopify_image.png b/odoo_product_tags/static/description/assets/modules/shopify_image.png
deleted file mode 100644
index c6d92c16d..000000000
Binary files a/odoo_product_tags/static/description/assets/modules/shopify_image.png and /dev/null differ
diff --git a/odoo_product_tags/static/description/index.html b/odoo_product_tags/static/description/index.html
index 6c25875e8..f4a74824f 100644
--- a/odoo_product_tags/static/description/index.html
+++ b/odoo_product_tags/static/description/index.html
@@ -106,7 +106,7 @@
- Odoo Product Tags module allows you to add product tags. You can assign multiple tags to a product and multiple products to a tag with a single click.
+ Odoo Product Tags module allows you to add product tags from list view. You can assign multiple tags to a product and multiple products to a tag with a single click.
@@ -130,7 +130,7 @@
Mass Update
- Multiple product tags can be updated in the product template list view..
+ Multiple product tags can be updated in the product list view..
@@ -172,71 +172,6 @@
Screenshots
-
-
- Go to Sales -> Products -> Product Tag.
-
-
-
-
-
-
-
-
- Click on "Create" button to create new product tags, here you need to select tag name, description and color.