diff --git a/dynamic_product_label_print/README.rst b/dynamic_product_label_print/README.rst new file mode 100644 index 000000000..8cb82b34d --- /dev/null +++ b/dynamic_product_label_print/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Dynamic Product Label Print +=========================== +Dynamically print the barcode and product fields of multiple products. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + + +Credits +------- +* Developer: (V16) Ammu Raj, + (V17) Kailas Krishna + Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +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 `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/dynamic_product_label_print/__init__.py b/dynamic_product_label_print/__init__.py new file mode 100644 index 000000000..0fc29b5fa --- /dev/null +++ b/dynamic_product_label_print/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import models +from . import report +from . import wizard diff --git a/dynamic_product_label_print/__manifest__.py b/dynamic_product_label_print/__manifest__.py new file mode 100644 index 000000000..f83defa29 --- /dev/null +++ b/dynamic_product_label_print/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Dynamic Product Label Print', + 'version': '17.0.1.0.0', + 'category': 'Warehouse,Sales', + 'summary': "Print Label Dynamically for multiple products", + 'description': "Dynamically print the barcode and product fields of " + "multiple products", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['stock'], + 'data': [ + 'security/ir.model.access.csv', + 'report/label_layout_templates.xml', + 'views/dynamic_template_views.xml', + 'wizard/product_label_layout_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/dynamic_product_label_print/doc/RELEASE_NOTES.md b/dynamic_product_label_print/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..cf09db525 --- /dev/null +++ b/dynamic_product_label_print/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 27.05.2024 +#### Version 17.0.1.0.0 +#### ADD + +- Initial commit for Dynamic Product Label Print diff --git a/dynamic_product_label_print/models/__init__.py b/dynamic_product_label_print/models/__init__.py new file mode 100644 index 000000000..86aff268b --- /dev/null +++ b/dynamic_product_label_print/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import dynamic_fields +from . import dynamic_template diff --git a/dynamic_product_label_print/models/dynamic_fields.py b/dynamic_product_label_print/models/dynamic_fields.py new file mode 100644 index 000000000..9a9359d66 --- /dev/null +++ b/dynamic_product_label_print/models/dynamic_fields.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class DynamicFields(models.Model): + """One2many fields of dynamic template""" + _name = "dynamic.fields" + _description = "Dynamic Fields" + + def set_domain(self): + """Fields of the product model""" + model_id = self.env['ir.model'].sudo().search( + [('model', '=', 'product.product')]) + return [('model_id', '=', model_id.id), ('state', '=', 'base'), ( + 'name', '=', + ['name', 'categ_id', 'detailed_type', 'list_price'])] + + size = fields.Char(string='Font Size', help="Set the size of the field") + color = fields.Char(string='Font Color', help="Set the colour of the field") + fd_name_id = fields.Many2one('ir.model.fields', string='Field Name', + domain=set_domain, help='Name of the field') + type = fields.Selection(string='Type', related='fd_name_id.ttype', + help='Type of the field name') + field_id = fields.Many2one('dynamic.template', string='Fields', + help='Relation from dynamic templates') diff --git a/dynamic_product_label_print/models/dynamic_template.py b/dynamic_product_label_print/models/dynamic_template.py new file mode 100644 index 000000000..f4db94489 --- /dev/null +++ b/dynamic_product_label_print/models/dynamic_template.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import fields, models + + +class DynamicTemplate(models.Model): + """Dynamic template for Products""" + _name = "dynamic.template" + _description = 'Dynamic Template' + + name = fields.Char(string='Name', required=True, + help='Name of the template') + bc_height = fields.Char(string='Barcode Height', required=True, + help='Height of the barcode') + bc_width = fields.Char(string='Barcode width', required=True, + help='Width of the barcode') + dynamic_field_ids = fields.One2many('dynamic.fields', 'field_id', + string='Fields', + help='You can select the required field ' + 'from the product with required ' + 'size and color for viewing in the ' + 'label report') diff --git a/dynamic_product_label_print/report/__init__.py b/dynamic_product_label_print/report/__init__.py new file mode 100644 index 000000000..40c5b259e --- /dev/null +++ b/dynamic_product_label_print/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import product_barcode_report diff --git a/dynamic_product_label_print/report/label_layout_templates.xml b/dynamic_product_label_print/report/label_layout_templates.xml new file mode 100644 index 000000000..e7109f487 --- /dev/null +++ b/dynamic_product_label_print/report/label_layout_templates.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + Product Label (PDF) + product.template + qweb-pdf + dynamic_product_label_print.report_dynamic + dynamic_product_label_print.report_dynamic + + 'Products Labels - %s' % + (object.name) + + + report + + diff --git a/dynamic_product_label_print/report/product_barcode_report.py b/dynamic_product_label_print/report/product_barcode_report.py new file mode 100644 index 000000000..1ab5f5637 --- /dev/null +++ b/dynamic_product_label_print/report/product_barcode_report.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from collections import defaultdict +from odoo import models, _ +from odoo.exceptions import UserError + + +def _prepare_datas(env, data): + """ + Change product ids by actual product object to get access to fields in xml + template we need to pass ids because reports only accepts native python + types (int, float, strings, ...) + """ + if data.get('active_model') == 'product.template': + Product = env['product.template'].with_context( + display_default_code=False) + elif data.get('active_model') == 'product.product': + Product = env['product.product'].with_context( + display_default_code=False) + else: + raise UserError(_('Product model not defined, Please contact your administrator.')) + + total = 0 + quantity_by_product = defaultdict(list) + for product_qty, qnty in data.get('quantity_by_product').items(): + product = Product.browse(int(product_qty)) + quantity_by_product[product].append((product.barcode, qnty, product.name, + product.categ_id.name, + product.detailed_type, + product.list_price)) + total += qnty + if data.get('custom_barcodes'): + # We expect custom barcodes format as: {product: [(barcode, qty_of_barcode)]} + for product, barcodes_qtys in data.get('custom_barcodes').items(): + quantity_by_product[Product.browse(int(product))] += (barcodes_qtys) + total += sum(qty for _, qty in barcodes_qtys) + return { + 'quantity': quantity_by_product, + } + + +class ReportProductTemplateLabelDynamic(models.AbstractModel): + """Product Dynamic Report""" + _name = 'report.dynamic_product_label_print.report_dynamic' + _description = 'Product Dynamic Report' + + def _get_report_values(self, docids, data): + """ + override the method to create custom report with custom values + :param docids: the recordset/ record from which the report action is + invoked + :param data: report data + :return: data and recordsets to be used in the report template + """ + return _prepare_datas(self.env, data) diff --git a/dynamic_product_label_print/security/ir.model.access.csv b/dynamic_product_label_print/security/ir.model.access.csv new file mode 100644 index 000000000..85ced2b88 --- /dev/null +++ b/dynamic_product_label_print/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_dynamic_template_user,access.dynamic.template.user,model_dynamic_template,base.group_user,1,1,1,1 +access_dynamic_fields_user,access.dynamic.fields.user,model_dynamic_fields,base.group_user,1,1,1,1 diff --git a/dynamic_product_label_print/static/description/assets/icons/capture (1).png b/dynamic_product_label_print/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/capture (1).png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/check.png b/dynamic_product_label_print/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/check.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/chevron.png b/dynamic_product_label_print/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/chevron.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/cogs.png b/dynamic_product_label_print/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/cogs.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/consultation.png b/dynamic_product_label_print/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/consultation.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/ecom-black.png b/dynamic_product_label_print/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/ecom-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/education-black.png b/dynamic_product_label_print/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/education-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/hotel-black.png b/dynamic_product_label_print/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/hotel-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/img.png b/dynamic_product_label_print/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/img.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/license.png b/dynamic_product_label_print/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/license.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/lifebuoy.png b/dynamic_product_label_print/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/lifebuoy.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/manufacturing-black.png b/dynamic_product_label_print/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/manufacturing-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/photo-capture.png b/dynamic_product_label_print/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/photo-capture.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/pos-black.png b/dynamic_product_label_print/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/pos-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/puzzle.png b/dynamic_product_label_print/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/puzzle.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/restaurant-black.png b/dynamic_product_label_print/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/restaurant-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/service-black.png b/dynamic_product_label_print/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/service-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/trading-black.png b/dynamic_product_label_print/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/trading-black.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/training.png b/dynamic_product_label_print/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/training.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/update.png b/dynamic_product_label_print/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/update.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/user.png b/dynamic_product_label_print/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/user.png differ diff --git a/dynamic_product_label_print/static/description/assets/icons/wrench.png b/dynamic_product_label_print/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/icons/wrench.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/Cybrosys R.png b/dynamic_product_label_print/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/Cybrosys R.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/email.svg b/dynamic_product_label_print/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/phone.svg b/dynamic_product_label_print/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/star (1) 2.svg b/dynamic_product_label_print/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/support (1) 1.svg b/dynamic_product_label_print/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/support-email.svg b/dynamic_product_label_print/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/tick-mark.svg b/dynamic_product_label_print/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/whatsapp 1.svg b/dynamic_product_label_print/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/misc/whatsapp.svg b/dynamic_product_label_print/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/dynamic_product_label_print/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dynamic_product_label_print/static/description/assets/modules/1.jpg b/dynamic_product_label_print/static/description/assets/modules/1.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/1.jpg differ diff --git a/dynamic_product_label_print/static/description/assets/modules/2.jpg b/dynamic_product_label_print/static/description/assets/modules/2.jpg new file mode 100644 index 000000000..677f72279 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/2.jpg differ diff --git a/dynamic_product_label_print/static/description/assets/modules/3.png b/dynamic_product_label_print/static/description/assets/modules/3.png new file mode 100644 index 000000000..a5299d338 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/3.png differ diff --git a/dynamic_product_label_print/static/description/assets/modules/4.png b/dynamic_product_label_print/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/4.png differ diff --git a/dynamic_product_label_print/static/description/assets/modules/5.jpg b/dynamic_product_label_print/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5ae24843e Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/5.jpg differ diff --git a/dynamic_product_label_print/static/description/assets/modules/6.png b/dynamic_product_label_print/static/description/assets/modules/6.png new file mode 100644 index 000000000..0dea4f332 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/6.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/1.png b/dynamic_product_label_print/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4014ef1e1 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/1.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/2.png b/dynamic_product_label_print/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..4364fc6b8 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/2.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/3.png b/dynamic_product_label_print/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..0159d0d7c Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/3.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/4.png b/dynamic_product_label_print/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..cc1e80781 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/4.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/5.png b/dynamic_product_label_print/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..fd1c1e7c8 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/5.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/6.png b/dynamic_product_label_print/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..bedd9059f Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/6.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/hero.gif b/dynamic_product_label_print/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..e2b5f92b0 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/hero.gif differ diff --git a/dynamic_product_label_print/static/description/banner.jpg b/dynamic_product_label_print/static/description/banner.jpg new file mode 100644 index 000000000..ff91e1360 Binary files /dev/null and b/dynamic_product_label_print/static/description/banner.jpg differ diff --git a/dynamic_product_label_print/static/description/icon.png b/dynamic_product_label_print/static/description/icon.png new file mode 100644 index 000000000..1c50fd7a9 Binary files /dev/null and b/dynamic_product_label_print/static/description/icon.png differ diff --git a/dynamic_product_label_print/static/description/index.html b/dynamic_product_label_print/static/description/index.html new file mode 100644 index 000000000..1a5adb329 --- /dev/null +++ b/dynamic_product_label_print/static/description/index.html @@ -0,0 +1,748 @@ + + + + + + + Dynamic Product Label Print + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+
+

+ Dynamic Product Label Print

+

+ This Odoo App Helps to Print the Barcode or Label With Dynamic Fields By One Click. +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Possible to print required quantity the barcode

+
+
+
+
+
+
+ +
+
+

+ Provides to print the barcode of multiple product

+
+
+
+
+
+
+ +
+
+

+ Select the required fields that you want to print with barcode

+
+
+
+
+
+
+ +
+
+

+ Specify the size (in pixels) of the barcode and label from the template.

+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ Dynamic Product Print Label Template
+

You can create the Dynamic Product Template for the barcode from here.

+
+
+
+
+
+
+ +
+
+
+ Template
+

Here we can set the size of barcode and label then also + select the required field that need to print with the barcode. + Here during the selection of fields you can set the colour and size of the fields.

+
+
+
+
+
+
+ +
+
+
+ From the 'Print Label' Button of Products you can see one more option 'Dynamic Templates'
+
+
+
+
+
+
+ +
+
+ +
+
+
+ You can select the required template after + enable the Dynamic Template with required quantity
+
+
+
+
+
+
+ +
+
+
+ Dynamic Product Label
+
+
+
+
+
+
+
    +
  • + It is possible to print the required quantity of barcodes. +
  • +
  • + Allows printing barcodes for multiple products. +
  • +
  • + Define the size(px) of barcode and label from the template. +
  • +
  • + You can select the required fields that you want to print with barcode. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:15th May 2024 +
+

+ + Initial Commit for Dynamic Product Label Print.

+
+
+
+
+
+
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Licensing Consultancy

+
+
+
+
+
+
+

+ Our Industries

+ +
+
+
+
+
+
+ +

Trading

+

Easily procure and sell your products

+
+
+
+
+ +

POS

+

Easy configuration and convivial experience

+
+
+
+
+ +

+ Education

+

A platform for educational management

+
+
+
+
+ +

+ Manufacturing

+

Plan, track and schedule your operations

+
+
+
+
+ +

E-commerce & + Website

+

Mobile friendly, awe-inspiring product pages

+
+
+
+
+ +

Service + Management

+

Keep track of services and invoice

+
+
+
+
+ +

+ Restaurant

+

Run your bar or restaurant methodically

+
+
+
+
+ +

Hotel + Management

+

An all-inclusive hotel management application

+
+
+
+
+
+
+

+ Support

+
+
+
+
+
+
+
+ +
+ Need + Help? +

Got + questions or need help? Get in touch.

+
odoo@cybrosys.com +
+
+
+
+
+
+
+
+ +
+ WhatsApp +

Say hi to + us on WhatsApp!

+
+91 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/dynamic_product_label_print/views/dynamic_template_views.xml b/dynamic_product_label_print/views/dynamic_template_views.xml new file mode 100644 index 000000000..b37df26a4 --- /dev/null +++ b/dynamic_product_label_print/views/dynamic_template_views.xml @@ -0,0 +1,47 @@ + + + + + dynamic.template.view.form + dynamic.template + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + Dynamic Label Template + dynamic.template + tree,form + + + +
diff --git a/dynamic_product_label_print/wizard/__init__.py b/dynamic_product_label_print/wizard/__init__.py new file mode 100644 index 000000000..d911fb710 --- /dev/null +++ b/dynamic_product_label_print/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import product_label_layout diff --git a/dynamic_product_label_print/wizard/product_label_layout.py b/dynamic_product_label_print/wizard/product_label_layout.py new file mode 100644 index 000000000..dbb896852 --- /dev/null +++ b/dynamic_product_label_print/wizard/product_label_layout.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from odoo import api, fields, models, _ +from odoo.exceptions import UserError + + +class ProductLabelLayout(models.TransientModel): + """Inherited the product label layout wizard for adding new feature + Dynamic templates""" + _inherit = 'product.label.layout' + + print_format = fields.Selection( + selection_add=[('dynamic_template', 'Dynamic Template'), ], + ondelete={'dynamic_template': 'set default'}, + help="Added new selection for choosing dynamic template") + dynamic_template_id = fields.Many2one('dynamic.template', + help="Select the required template") + dynamic_field_ids = fields.Many2many('dynamic.fields', + 'dynamic_field_rel', + help='Relation to dynamic fields') + + @api.onchange('dynamic_template_id') + def _onchange_dynamic_template_id(self): + """Passing the values from the template to wizard""" + self.dynamic_field_ids = self.dynamic_template_id.dynamic_field_ids + + def _prepare_report_data(self): + """Passing the datas to template""" + xml_id, data = super()._prepare_report_data() + if 'dynamic_template' in self.print_format: + xml_id = 'dynamic_product_label_print.product_label_layout_form_dynamic' + active_model = '' + if self.product_tmpl_ids: + products = self.product_tmpl_ids.ids + active_model = 'product.template' + elif self.product_ids: + products = self.product_ids.ids + active_model = 'product.product' + dynamic_field_ids = [] + if self.product_ids: + dynamic_dict = [ + {'fields': self.product_ids.read([i.fd_name_id.name]), + 'size': i.size, + 'color': i.color} for i in self.dynamic_field_ids] + else: + dynamic_dict = [ + {'fields': self.product_tmpl_ids.read([i.fd_name_id.name]), + 'size': i.size, + 'color': i.color} for i in self.dynamic_field_ids] + dynamic_field_ids.append(dynamic_dict) + data = { + 'active_model': active_model, + 'quantity_by_product': {p: self.custom_quantity for p in + products}, + 'layout_wizard': self.dynamic_template_id, + 'bc_width': self.dynamic_template_id.bc_width, + 'bc_height': self.dynamic_template_id.bc_height, + 'dynamic_field_ids': dynamic_field_ids, + } + return xml_id, data + + def process(self): + """Returning the report action process for printing the label""" + action = super(ProductLabelLayout, self).process() + self.ensure_one() + xml_id, data = self._prepare_report_data() + if not xml_id: + raise UserError(_('Unable to find report template for %s format')) + report_action = self.env.ref(xml_id).report_action(None, data=data) + report_action.update({'close_on_report_download': True}) + return action diff --git a/dynamic_product_label_print/wizard/product_label_layout_views.xml b/dynamic_product_label_print/wizard/product_label_layout_views.xml new file mode 100644 index 000000000..3ee6e4757 --- /dev/null +++ b/dynamic_product_label_print/wizard/product_label_layout_views.xml @@ -0,0 +1,18 @@ + + + + + product.label.layout.view.form.inherit.dynamic.product.label.print + product.label.layout + form + + + + + + + + +