diff --git a/pos_auto_lot_selection/README.rst b/pos_auto_lot_selection/README.rst new file mode 100644 index 000000000..45a870914 --- /dev/null +++ b/pos_auto_lot_selection/README.rst @@ -0,0 +1,46 @@ +.. 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 + +POS Auto LOT Selection +====================== +This module helps to Auto select Lot/Serial numbers for products in pos + +Configuration +============= +* No additional configurations needed + +License +------- +Affero General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V15) Nikhil M, 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/pos_auto_lot_selection/__init__.py b/pos_auto_lot_selection/__init__.py new file mode 100644 index 000000000..04138f74a --- /dev/null +++ b/pos_auto_lot_selection/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nikhil M(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 diff --git a/pos_auto_lot_selection/__manifest__.py b/pos_auto_lot_selection/__manifest__.py new file mode 100644 index 000000000..77dd4a0ef --- /dev/null +++ b/pos_auto_lot_selection/__manifest__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nikhil M(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': 'POS Auto LOT Selection', + 'version': '15.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """Automatic lot selection in POS """, + 'description': """This module helps to Auto select Lot/Serial numbers for + products in pos""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['point_of_sale', 'mrp','mrp_product_expiry'], + 'assets': { + 'point_of_sale.assets': [ + 'pos_auto_lot_selection/static/src/js/PosAutoLot.js', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/pos_auto_lot_selection/doc/RELEASE_NOTES.md b/pos_auto_lot_selection/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..67fe13258 --- /dev/null +++ b/pos_auto_lot_selection/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 28.06.2024 +#### Version 15.0.1.0.0 +#### ADD +- Initial Commit for POS Auto LOT Selection diff --git a/pos_auto_lot_selection/models/__init__.py b/pos_auto_lot_selection/models/__init__.py new file mode 100644 index 000000000..c7e9e441e --- /dev/null +++ b/pos_auto_lot_selection/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nikhil M(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 stock_lot diff --git a/pos_auto_lot_selection/models/stock_lot.py b/pos_auto_lot_selection/models/stock_lot.py new file mode 100644 index 000000000..617a2c193 --- /dev/null +++ b/pos_auto_lot_selection/models/stock_lot.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Nikhil M(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.tools import float_compare + + +class StockLot(models.Model): + """Inherit StockLot to add new fields and method to fetch available lots.""" + _inherit = "stock.production.lot" + + is_taken = fields.Boolean(string='Taken lot', + help='If enables this lot number is taken') + + @api.model + def get_available_lots_for_pos(self, product_id): + """Get available lots for a product suitable for the Point of Sale + (PoS).This method retrieves the available lots for a specific product + that are suitable for the Point of Sale (PoS) based on the configured + removal strategy. The lots are sorted based on the expiration date or + creation date,depending on the removal strategy.""" + company_id = self.env.company.id + removal_strategy_id = (self.env['product.template'].browse( + self.env['product.product'].browse(product_id).product_tmpl_id.id) + .categ_id.removal_strategy_id.method) + if removal_strategy_id == 'fefo': + lots = self.sudo().search( + ["&", ["product_id", "=", product_id],"&",["is_taken","=",False], + "|", ["company_id", "=", company_id], + ["company_id", "=", False]], + order='expiration_date asc') + else: + lots = self.sudo().search( + ["&", ["product_id", "=", product_id], "|", + ["company_id", "=", company_id], + ["company_id", "=", False], ], + order='create_date asc') + lots = lots.filtered(lambda l: float_compare( + l.product_qty, 0, + precision_digits=l.product_uom_id.rounding) > 0)[:1] + lots.is_taken = True + return lots.mapped("name") diff --git a/pos_auto_lot_selection/static/description/assets/icons/capture (1).png b/pos_auto_lot_selection/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/capture (1).png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/check.png b/pos_auto_lot_selection/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/check.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/chevron.png b/pos_auto_lot_selection/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/chevron.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/cogs.png b/pos_auto_lot_selection/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/cogs.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/consultation.png b/pos_auto_lot_selection/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/consultation.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/ecom-black.png b/pos_auto_lot_selection/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/ecom-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/education-black.png b/pos_auto_lot_selection/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/education-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/hotel-black.png b/pos_auto_lot_selection/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/hotel-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/img.png b/pos_auto_lot_selection/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/img.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/license.png b/pos_auto_lot_selection/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/license.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/lifebuoy.png b/pos_auto_lot_selection/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/manufacturing-black.png b/pos_auto_lot_selection/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/photo-capture.png b/pos_auto_lot_selection/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/photo-capture.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/pos-black.png b/pos_auto_lot_selection/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/pos-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/puzzle.png b/pos_auto_lot_selection/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/puzzle.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/restaurant-black.png b/pos_auto_lot_selection/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/service-black.png b/pos_auto_lot_selection/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/service-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/trading-black.png b/pos_auto_lot_selection/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/trading-black.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/training.png b/pos_auto_lot_selection/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/training.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/update.png b/pos_auto_lot_selection/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/update.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/user.png b/pos_auto_lot_selection/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/user.png differ diff --git a/pos_auto_lot_selection/static/description/assets/icons/wrench.png b/pos_auto_lot_selection/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/icons/wrench.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/Cybrosys R.png b/pos_auto_lot_selection/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/Cybrosys R.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/categories.png b/pos_auto_lot_selection/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/categories.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/check-box.png b/pos_auto_lot_selection/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/check-box.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/compass.png b/pos_auto_lot_selection/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/compass.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/corporate.png b/pos_auto_lot_selection/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/corporate.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/customer-support.png b/pos_auto_lot_selection/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/customer-support.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/cybrosys-logo.png b/pos_auto_lot_selection/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/email.svg b/pos_auto_lot_selection/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/features.png b/pos_auto_lot_selection/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/features.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/logo.png b/pos_auto_lot_selection/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/logo.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/phone.svg b/pos_auto_lot_selection/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/pictures.png b/pos_auto_lot_selection/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/pictures.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/pie-chart.png b/pos_auto_lot_selection/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/pie-chart.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/right-arrow.png b/pos_auto_lot_selection/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/right-arrow.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/star (1) 2.svg b/pos_auto_lot_selection/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/star.png b/pos_auto_lot_selection/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/star.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/support (1) 1.svg b/pos_auto_lot_selection/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/support-email.svg b/pos_auto_lot_selection/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/support.png b/pos_auto_lot_selection/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/support.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/tick-mark.svg b/pos_auto_lot_selection/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/whatsapp 1.svg b/pos_auto_lot_selection/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/misc/whatsapp.png b/pos_auto_lot_selection/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/misc/whatsapp.png differ diff --git a/pos_auto_lot_selection/static/description/assets/misc/whatsapp.svg b/pos_auto_lot_selection/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/pos_auto_lot_selection/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pos_auto_lot_selection/static/description/assets/modules/1.png b/pos_auto_lot_selection/static/description/assets/modules/1.png new file mode 100755 index 000000000..b9375c944 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/1.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/2.png b/pos_auto_lot_selection/static/description/assets/modules/2.png new file mode 100755 index 000000000..a89c30f00 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/2.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/3.png b/pos_auto_lot_selection/static/description/assets/modules/3.png new file mode 100755 index 000000000..bafcdc5b5 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/3.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/4.png b/pos_auto_lot_selection/static/description/assets/modules/4.png new file mode 100755 index 000000000..1ca1b66f2 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/4.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/5.gif b/pos_auto_lot_selection/static/description/assets/modules/5.gif new file mode 100755 index 000000000..2a5f8e659 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/5.gif differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/5.png b/pos_auto_lot_selection/static/description/assets/modules/5.png new file mode 100755 index 000000000..6b1fb9016 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/5.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/6.png b/pos_auto_lot_selection/static/description/assets/modules/6.png new file mode 100755 index 000000000..b9da6a367 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/6.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/banner.png b/pos_auto_lot_selection/static/description/assets/modules/banner.png new file mode 100644 index 000000000..470b16f53 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/banner.png differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/hero.gif b/pos_auto_lot_selection/static/description/assets/modules/hero.gif new file mode 100644 index 000000000..cc78cb1ea Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/hero.gif differ diff --git a/pos_auto_lot_selection/static/description/assets/modules/icon.png b/pos_auto_lot_selection/static/description/assets/modules/icon.png new file mode 100644 index 000000000..85de26ead Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/modules/icon.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/1.png b/pos_auto_lot_selection/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..f44cbaa6b Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/1.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/2.png b/pos_auto_lot_selection/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..30909353b Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/2.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/3.png b/pos_auto_lot_selection/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..e615b49d0 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/3.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/4.png b/pos_auto_lot_selection/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..466d8ffd4 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/4.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/5.png b/pos_auto_lot_selection/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..f1fc12fa1 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/5.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/6.png b/pos_auto_lot_selection/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..8492012ec Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/6.png differ diff --git a/pos_auto_lot_selection/static/description/assets/screenshots/hero.gif b/pos_auto_lot_selection/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..6c3e0ab22 Binary files /dev/null and b/pos_auto_lot_selection/static/description/assets/screenshots/hero.gif differ diff --git a/pos_auto_lot_selection/static/description/banner.png b/pos_auto_lot_selection/static/description/banner.png new file mode 100644 index 000000000..470b16f53 Binary files /dev/null and b/pos_auto_lot_selection/static/description/banner.png differ diff --git a/pos_auto_lot_selection/static/description/icon.png b/pos_auto_lot_selection/static/description/icon.png new file mode 100644 index 000000000..85de26ead Binary files /dev/null and b/pos_auto_lot_selection/static/description/icon.png differ diff --git a/pos_auto_lot_selection/static/description/index.html b/pos_auto_lot_selection/static/description/index.html new file mode 100755 index 000000000..bae162b90 --- /dev/null +++ b/pos_auto_lot_selection/static/description/index.html @@ -0,0 +1,642 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ POS Auto LOT Selection +

+

+ Automatic lot selection in POS. +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview

+
+
+
+ This module helps to Auto select Lot/Serial numbers for + products in pos. + + +
+
+ +
+

+ Features +

+
+
+
+ + Enable Lots/Serial Numbers in Products. + +
+
+ + Set Expiry Date for product. +
+ +
+ + Set Force Removal strategy in Product + category to FEFO(First Expiry First + Out). +
+
+
+
+ + +
+
+ +
+

+ Screenshots

+
+ +
+
+
+

+ Enable Lots/Serial Numbers in Products.

+

+ In the Inventory tab in product select Lot for products. +

+ +
+ +
+

+ Set Expiry Date for product. +

+ + +
+
+

+ Set Force Removal strategy in Product category to FEFO(First Expiry First Out). +

+ +
+
+

+ + Give Lot/Serial numbers to the product. +

+ +
+
+

+ Expiry date for that Lot/Serial number is generated. +

+ + +
+
+

+ When a product is selected in POS, it will automatically assign the lot number with the earliest + expiry date for that product. +

+ +
+
+
+ + + +
+
+

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

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

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+
+
+ diff --git a/pos_auto_lot_selection/static/src/js/PosAutoLot.js b/pos_auto_lot_selection/static/src/js/PosAutoLot.js new file mode 100644 index 000000000..494cf6d59 --- /dev/null +++ b/pos_auto_lot_selection/static/src/js/PosAutoLot.js @@ -0,0 +1,120 @@ +odoo.define('pos_auto_lot_selection.ProductScreen', function (require) { + 'use strict'; + + const ProductScreen = require('point_of_sale.ProductScreen'); + const Registries = require('point_of_sale.Registries'); + var rpc = require('web.rpc'); + + const PosAutoLotSelection = (ProductScreen) => + class extends ProductScreen { + constructor() { + super(...arguments); + } + async _getAddProductOptions(product, code) { + let price_extra = 0.0; + let draftPackLotLines, weight, description, packLotLinesToEdit; + let productConfiguratorPayload; + if (this.env.pos.config.product_configurator && _.some(product.attribute_line_ids, (id) => id in this.env.pos.attributes_by_ptal_id)) { + let attributes = _.map(product.attribute_line_ids, (id) => this.env.pos.attributes_by_ptal_id[id]) + .filter((attr) => attr !== undefined); + let { confirmed, payload } = await this.showPopup('ProductConfiguratorPopup', { + product: product, + attributes: attributes, + }); + productConfiguratorPayload = payload; + if (confirmed) { + description = payload.selected_attributes.join(', '); + price_extra += payload.price_extra; + } else { + return; + } + } + + // Gather lot information if required. + if (['serial', 'lot'].includes(product.tracking) && (this.env.pos.picking_type.use_create_lots || this.env.pos.picking_type.use_existing_lots)) { + const isAllowOnlyOneLot = product.isAllowOnlyOneLot(); + if (isAllowOnlyOneLot) { + packLotLinesToEdit = []; + } else { + const orderline = this.currentOrder + .get_orderlines() + .filter(line => !line.get_discount()) + .find(line => line.product.id === product.id); + if (orderline) { + packLotLinesToEdit = orderline.getPackLotLinesToEdit(); + } else { + packLotLinesToEdit = []; + } + } + // if the lot information exists in the barcode, we don't need to ask it from the user. + if (code && code.type === 'lot') { + // consider the old and new packlot lines + const modifiedPackLotLines = Object.fromEntries( + packLotLinesToEdit.filter(item => item.id).map(item => [item.id, item.text]) + ); + const newPackLotLines = [ + { lot_name: code.code }, + ]; + draftPackLotLines = { modifiedPackLotLines, newPackLotLines }; + } else { + const result = await this.rpc({ + model: 'stock.production.lot', + method: 'get_available_lots_for_pos', + args: [[product.id]], + }); + if(!result[0]){ + const { confirmed, payload } = await this.showPopup('EditListPopup', { + title: this.env._t('Lot/Serial Number(s) Required'), + isSingleItem: isAllowOnlyOneLot, + array: packLotLinesToEdit, + }); + if (confirmed) { + // Segregate the old and new packlot lines + const modifiedPackLotLines = Object.fromEntries( + payload.newArray.filter(item => item.id).map(item => [item.id, item.text]) + ); + const newPackLotLines = payload.newArray.filter(item => !item.id).map(item => ({ lot_name: item.text })); + + draftPackLotLines = { modifiedPackLotLines, newPackLotLines }; + } else { + // We don't proceed on adding product. + return; + } + } + else{ + const modifiedPackLotLines = result[0]; + const newPackLotLines = result.map(item => ({ lot_name: result[0] })); + draftPackLotLines = { modifiedPackLotLines, newPackLotLines }; + } + } + } + + // Take the weight if necessary. + if (product.to_weight && this.env.pos.config.iface_electronic_scale) { + // Show the ScaleScreen to weigh the product. + if (this.isScaleAvailable) { + const { confirmed, payload } = await this.showTempScreen('ScaleScreen', { + product, + }); + if (confirmed) { + weight = payload.weight; + } else { + // do not add the product; + return; + } + } else { + await this._onScaleNotAvailable(); + } + } + + if (code && this.env.pos.db.product_packaging_by_barcode[code.code]) { + weight = this.env.pos.db.product_packaging_by_barcode[code.code].qty; + } + return { draftPackLotLines, quantity: weight, description, price_extra, productConfiguratorPayload }; + } + }; + + Registries.Component.extend(ProductScreen, PosAutoLotSelection); + + return ProductScreen; +});