diff --git a/pos_traceability_validation/README.rst b/pos_traceability_validation/README.rst new file mode 100644 index 000000000..dcf09a67a --- /dev/null +++ b/pos_traceability_validation/README.rst @@ -0,0 +1,15 @@ +POS Serial Number Validator v15 +=============================== + +Validate Serial number of a product by checking availability in stock + +Credits +======= +Cybrosys Techno Solutions + +Author +------ +* Akhilesh N S +* V13 Sreenath +* V14 Jibin James +* V15 Mily diff --git a/pos_traceability_validation/__init__.py b/pos_traceability_validation/__init__.py new file mode 100644 index 000000000..902e46afa --- /dev/null +++ b/pos_traceability_validation/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S() +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import models diff --git a/pos_traceability_validation/__manifest__.py b/pos_traceability_validation/__manifest__.py new file mode 100644 index 000000000..39979c572 --- /dev/null +++ b/pos_traceability_validation/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2020-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S() +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +{ + 'name': 'POS Serial Number Validator', + 'version': '15.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'category': 'Point of Sale', + 'summary': """Validate Serial number of a product by checking availability in stock""", + 'description': """Validate Serial number of a product by checking availability in stock""", + 'depends': ['point_of_sale'], + 'assets': { + 'web.assets_backend': [ + 'pos_traceability_validation/static/src/js/pos_models.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, +} + diff --git a/pos_traceability_validation/doc/RELEASE_NOTES.md b/pos_traceability_validation/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..922b4cb2a --- /dev/null +++ b/pos_traceability_validation/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 08.04.2021 +#### Version 15.0.1.0.0 +#### ADD + +Initial Commit diff --git a/pos_traceability_validation/models/__init__.py b/pos_traceability_validation/models/__init__.py new file mode 100644 index 000000000..f607090ab --- /dev/null +++ b/pos_traceability_validation/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S() +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import traceability_validation diff --git a/pos_traceability_validation/models/traceability_validation.py b/pos_traceability_validation/models/traceability_validation.py new file mode 100644 index 000000000..2be1e6e92 --- /dev/null +++ b/pos_traceability_validation/models/traceability_validation.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2019-TODAY Cybrosys Technologies(). +# Author: Akhilesh N S() +# 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 +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from odoo import models, api + + +class ValidateLotNumber(models.Model): + _name = 'serial_no.validation' + + @api.model + def validate_lots(self, lots): + processed = [] + LotObj = self.env['stock.production.lot'] + for lot in lots: + lot_id = LotObj.search([('name', '=', lot)], limit=1) + try: + if lot_id.product_qty > 0 and lot not in processed: + processed.append(lot) + continue + else: + if lot in processed: + return ['duplicate', lot] + else: + return ['no_stock', lot] + except Exception: + return ['except', lot] + return True diff --git a/pos_traceability_validation/static/description/assets/icons/check.png b/pos_traceability_validation/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/check.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/chevron.png b/pos_traceability_validation/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/chevron.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/cogs.png b/pos_traceability_validation/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/cogs.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/consultation.png b/pos_traceability_validation/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/consultation.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/ecom-black.png b/pos_traceability_validation/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/ecom-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/education-black.png b/pos_traceability_validation/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/education-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/hotel-black.png b/pos_traceability_validation/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/hotel-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/license.png b/pos_traceability_validation/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/license.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/lifebuoy.png b/pos_traceability_validation/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/logo.png b/pos_traceability_validation/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/logo.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/manufacturing-black.png b/pos_traceability_validation/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/pos-black.png b/pos_traceability_validation/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/pos-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/puzzle.png b/pos_traceability_validation/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/puzzle.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/restaurant-black.png b/pos_traceability_validation/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/service-black.png b/pos_traceability_validation/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/service-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/trading-black.png b/pos_traceability_validation/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/trading-black.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/training.png b/pos_traceability_validation/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/training.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/update.png b/pos_traceability_validation/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/update.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/user.png b/pos_traceability_validation/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/user.png differ diff --git a/pos_traceability_validation/static/description/assets/icons/wrench.png b/pos_traceability_validation/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_traceability_validation/static/description/assets/icons/wrench.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/budget_image.png b/pos_traceability_validation/static/description/assets/modules/budget_image.png new file mode 100644 index 000000000..b50130c7d Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/budget_image.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/credit_image.png b/pos_traceability_validation/static/description/assets/modules/credit_image.png new file mode 100644 index 000000000..3ad04ecfd Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/credit_image.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/employee_image.png b/pos_traceability_validation/static/description/assets/modules/employee_image.png new file mode 100644 index 000000000..30ad58232 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/employee_image.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/export_image.png b/pos_traceability_validation/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/export_image.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/gantt_image.png b/pos_traceability_validation/static/description/assets/modules/gantt_image.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/gantt_image.png differ diff --git a/pos_traceability_validation/static/description/assets/modules/quotation_image.png b/pos_traceability_validation/static/description/assets/modules/quotation_image.png new file mode 100644 index 000000000..499b1a72f Binary files /dev/null and b/pos_traceability_validation/static/description/assets/modules/quotation_image.png differ diff --git a/pos_traceability_validation/static/description/assets/screenshots/hero.gif b/pos_traceability_validation/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..cd5582fb8 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/screenshots/hero.gif differ diff --git a/pos_traceability_validation/static/description/assets/screenshots/pos1.png b/pos_traceability_validation/static/description/assets/screenshots/pos1.png new file mode 100644 index 000000000..37deab111 Binary files /dev/null and b/pos_traceability_validation/static/description/assets/screenshots/pos1.png differ diff --git a/pos_traceability_validation/static/description/assets/screenshots/pos2.png b/pos_traceability_validation/static/description/assets/screenshots/pos2.png new file mode 100644 index 000000000..607aec73e Binary files /dev/null and b/pos_traceability_validation/static/description/assets/screenshots/pos2.png differ diff --git a/pos_traceability_validation/static/description/banner.png b/pos_traceability_validation/static/description/banner.png new file mode 100644 index 000000000..4dac46522 Binary files /dev/null and b/pos_traceability_validation/static/description/banner.png differ diff --git a/pos_traceability_validation/static/description/icon.png b/pos_traceability_validation/static/description/icon.png new file mode 100644 index 000000000..78efe6fe4 Binary files /dev/null and b/pos_traceability_validation/static/description/icon.png differ diff --git a/pos_traceability_validation/static/description/index.html b/pos_traceability_validation/static/description/index.html new file mode 100644 index 000000000..7e99a7f51 --- /dev/null +++ b/pos_traceability_validation/static/description/index.html @@ -0,0 +1,572 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ POS Serial Number Validator

+

+ Validate the given Serial number of a product from stock +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ Currently in Odoo, Serial number validation at POS not available. This module validates given serial number is available in stock and prevent duplicated entry for more than one quantity. +

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Community & Enterprise Support

+

+ Available in Odoo 15.0 Community and Enterprise.

+
+
+
+
+ +
+
+

+ Validates given serial number is available in stock

+
+
+ +
+
+ +
+
+

+ Prevents duplicated entry for more than one quantity

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+
+

+ + Warnings for invalid Serial Number

+ + +
+ +
+

+ Warnings for Duplicate Serial Number

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

Suggested 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

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

Need Help?

+
+
+
+ + +
+ +
+ +
+ +
+ WhatsApp +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/pos_traceability_validation/static/src/js/pos_models.js b/pos_traceability_validation/static/src/js/pos_models.js new file mode 100644 index 000000000..041caa851 --- /dev/null +++ b/pos_traceability_validation/static/src/js/pos_models.js @@ -0,0 +1,74 @@ +odoo.define('pos_traceability_validation.pos_models', function (require) { +"use strict"; + const EditListPopup = require('point_of_sale.EditListPopup'); + const Registries = require('point_of_sale.Registries'); + var rpc = require('web.rpc'); + + const PosEditlistpopup = (EditListPopup) => + class extends EditListPopup { + async confirm() { + + if (this.props.title == 'Lot/Serial Number(s) Required'){ + + var lot_string = this.state.array + var lot_names = []; + for (var i = 0; i < lot_string.length; i++) { + + if (lot_string[i].text != ""){ + lot_names.push(lot_string[i].text); + } + + } + + const result = await rpc.query({ + model: 'serial_no.validation', + method: 'validate_lots', + args: [lot_names] + }) + + if(result != true){ + if(result[0] == 'no_stock'){ + this.showPopup('ErrorPopup', { + 'title': this.env._t('Insufficient stock'), + 'body': this.env._t("Insufficient stock for " + result[1]), + }); + + } + else if(result[0] == 'duplicate'){ + this.showPopup('ErrorPopup', { + 'title': this.env._t('Duplicate entry'), + 'body': this.env._t("Duplicate entry for " + result[1]), + }); + } + else if(result[0] == 'except'){ + alert("Exception occured with " + result[1]) + this.showPopup('ErrorPopup', { + 'title': this.env._t('Exception'), + 'body': this.env._t("Exception occured with" + result[1]), + }); + } + } + else{ + this.props.resolve({ confirmed: true, payload: await this.getPayload() }); + this.trigger('close-popup'); + + } + } + else{ + this.props.resolve({ confirmed: true, payload: await this.getPayload() }); + this.trigger('close-popup'); + } + + } + + }; + + Registries.Component.extend(EditListPopup, PosEditlistpopup); + + return EditListPopup; + + +}); + + +