diff --git a/dynamic_product_label_print/README.rst b/dynamic_product_label_print/README.rst new file mode 100644 index 000000000..4f1677d60 --- /dev/null +++ b/dynamic_product_label_print/README.rst @@ -0,0 +1,47 @@ +.. 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, 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..40b4f8d68 --- /dev/null +++ b/dynamic_product_label_print/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..6bfabf50b --- /dev/null +++ b/dynamic_product_label_print/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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': '16.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.png'], + '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..41271b82f --- /dev/null +++ b/dynamic_product_label_print/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 10.10.2023 +#### Version 16.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..791f9bc91 --- /dev/null +++ b/dynamic_product_label_print/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..c84b72ed9 --- /dev/null +++ b/dynamic_product_label_print/models/dynamic_fields.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..cb7474f13 --- /dev/null +++ b/dynamic_product_label_print/models/dynamic_template.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..c27a1f61f --- /dev/null +++ b/dynamic_product_label_print/report/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..962494d29 --- /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) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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/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/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/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/categories.png b/dynamic_product_label_print/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/categories.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/check-box.png b/dynamic_product_label_print/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/check-box.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/compass.png b/dynamic_product_label_print/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/compass.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/corporate.png b/dynamic_product_label_print/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/corporate.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/customer-support.png b/dynamic_product_label_print/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/customer-support.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/cybrosys-logo.png b/dynamic_product_label_print/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/cybrosys-logo.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/features.png b/dynamic_product_label_print/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/features.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/logo.png b/dynamic_product_label_print/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/logo.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/pictures.png b/dynamic_product_label_print/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/pictures.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/pie-chart.png b/dynamic_product_label_print/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/pie-chart.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/right-arrow.png b/dynamic_product_label_print/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/right-arrow.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/star.png b/dynamic_product_label_print/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/star.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/support.png b/dynamic_product_label_print/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/support.png differ diff --git a/dynamic_product_label_print/static/description/assets/misc/whatsapp.png b/dynamic_product_label_print/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/misc/whatsapp.png differ diff --git a/dynamic_product_label_print/static/description/assets/modules/1.png b/dynamic_product_label_print/static/description/assets/modules/1.png new file mode 100644 index 000000000..15b141248 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/1.png differ diff --git a/dynamic_product_label_print/static/description/assets/modules/2.png b/dynamic_product_label_print/static/description/assets/modules/2.png new file mode 100644 index 000000000..57eebc5b2 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/2.png 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..31ed46762 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..f14dc60c5 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.png b/dynamic_product_label_print/static/description/assets/modules/5.png new file mode 100644 index 000000000..216c130e0 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/modules/5.png 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..dd2b151c6 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/dynamic1.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic1.png new file mode 100644 index 000000000..585f20fbe Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic1.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/dynamic2.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic2.png new file mode 100644 index 000000000..5ee7588e8 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic2.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/dynamic3.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic3.png new file mode 100644 index 000000000..ef2a8304d Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic3.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/dynamic4.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic4.png new file mode 100644 index 000000000..9c2bdb9b0 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic4.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/dynamic5.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic5.png new file mode 100644 index 000000000..0d9d80e0e Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic5.png differ diff --git a/dynamic_product_label_print/static/description/assets/screenshots/dynamic6.png b/dynamic_product_label_print/static/description/assets/screenshots/dynamic6.png new file mode 100644 index 000000000..fa5914d13 Binary files /dev/null and b/dynamic_product_label_print/static/description/assets/screenshots/dynamic6.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..0f90a6dce 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.png b/dynamic_product_label_print/static/description/banner.png new file mode 100644 index 000000000..25d89fa6d Binary files /dev/null and b/dynamic_product_label_print/static/description/banner.png 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..d92241bfe 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..ac5870376 --- /dev/null +++ b/dynamic_product_label_print/static/description/index.html @@ -0,0 +1,559 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo SH +
+
+
+ +
+
+
+ +

+ Dynamic Product Label Print +

+

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

+ + +
+
+
+
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ Dynamically print the barcode and product fields of multiple products. +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Possible to print required quantity the barcode +
+
+ + Provides to print the barcode of multiple product +
+
+
+ +
+ + Define the size(px) of barcode and label from the template. +
+ +
+ + You can select the required fields that you want to print with barcode +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

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 +

+ +
+ +
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ 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 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ 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..f1057f136 --- /dev/null +++ b/dynamic_product_label_print/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..168ec19f3 --- /dev/null +++ b/dynamic_product_label_print/wizard/product_label_layout.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (odoo@cybrosys.com) +# +# 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..d737e93a8 --- /dev/null +++ b/dynamic_product_label_print/wizard/product_label_layout_views.xml @@ -0,0 +1,19 @@ + + + + + + product.label.layout.view.form.inherit.dynamic.product.label.print + + product.label.layout + form + + + + + + + + +