diff --git a/README.md b/README.md index 8b10e6960..6864725ce 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# odex25-standard-moduless +# odex25-standard-modules This Repo contains general standard modules for all projects. diff --git a/odex25_pos/bi_pos_restrict_zero_qty/LICENSE b/odex25_pos/bi_pos_restrict_zero_qty/LICENSE new file mode 100644 index 000000000..de7bcc64e --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/LICENSE @@ -0,0 +1,28 @@ +Odoo Proprietary License v1.0 + +This software and associated files (the "Software") may only be used (executed, +modified, executed after modifications) if you have purchased a valid license +from the authors, typically via Odoo Apps, or if you have received a written +agreement from the authors of the Software (see the COPYRIGHT file). + +You may develop Odoo modules that use the Software as a library (typically +by depending on it, importing it and using its resources), but without copying +any source code or material from the Software. You may distribute those +modules under the license of your choice, provided that this license is +compatible with the terms of the Odoo Proprietary License (For example: +LGPL, MIT, or proprietary licenses similar to this one). + +It is forbidden to publish, distribute, sublicense, or sell copies of the Software +or modified copies of the Software. + +The above copyright notice and this permission notice must be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + diff --git a/odex25_pos/bi_pos_restrict_zero_qty/ReadME.txt b/odex25_pos/bi_pos_restrict_zero_qty/ReadME.txt new file mode 100644 index 000000000..9806843b1 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/ReadME.txt @@ -0,0 +1 @@ +=> 14.0.0.1(06/09/2023) :Remove quantity validation for service product. diff --git a/odex25_pos/bi_pos_restrict_zero_qty/__init__.py b/odex25_pos/bi_pos_restrict_zero_qty/__init__.py new file mode 100644 index 000000000..b37c72e54 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# Part of BrowseInfo. See LICENSE file for full copyright and licensing details. + + +from . import models + diff --git a/odex25_pos/bi_pos_restrict_zero_qty/__manifest__.py b/odex25_pos/bi_pos_restrict_zero_qty/__manifest__.py new file mode 100644 index 000000000..4a6421a1c --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/__manifest__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Part of BrowseInfo. See LICENSE file for full copyright and licensing details. + +{ + 'name': 'POS Restrict Zero Quantity', + 'version': '14.0.0.1', + 'category':'Odex25-POS/Odex25-POS', + 'summary': 'Point Of Sale Restrict Zero Quantity pos restrict negative stock sales of products with zero or negative stock levels pos restrict zero stock product pos Restrict product with zero Quantity pos order line restriction with zero Quantity on pos', + 'description' :""" + The Point Of Sale Restrict Zero Quantity Odoo App helps users to prevents the sales of products with zero or negative stock levels, ensuring that businesses never run out of stock. Additionally, the app can be configured to display a warning message when the stock level of a product is getting low. When a customer attempts to purchase a product with a stock level below the minimum, the app will display an error message, preventing the sale from going through. + """, + 'author': 'BrowseInfo', + 'website': 'https://www.browseinfo.com', + 'depends': ['base','point_of_sale'], + 'data': [ + 'views/pos_config_view.xml', + 'views/pos_assets_common.xml', + ], + 'demo': [], + 'test': [], + 'license':'OPL-1', + 'installable': True, + 'auto_install': False, + 'live_test_url':'https://youtu.be/6pUwaykhfQE', + "images":['static/description/Banner.gif'], +} diff --git a/odex25_pos/bi_pos_restrict_zero_qty/models/__init__.py b/odex25_pos/bi_pos_restrict_zero_qty/models/__init__.py new file mode 100644 index 000000000..87ac1ce22 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of BrowseInfo. See LICENSE file for full copyright and licensing details. + +from . import pos diff --git a/odex25_pos/bi_pos_restrict_zero_qty/models/pos.py b/odex25_pos/bi_pos_restrict_zero_qty/models/pos.py new file mode 100644 index 000000000..4d6a200c3 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/models/pos.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# Part of BrowseInfo. See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models, _ + + +class PosConfig(models.Model): + _inherit = "pos.config" + + restrict_zero_qty = fields.Boolean(string='Restrict Zero Quantity') + diff --git a/odex25_pos/bi_pos_restrict_zero_qty/security/ir.model.access.csv b/odex25_pos/bi_pos_restrict_zero_qty/security/ir.model.access.csv new file mode 100644 index 000000000..97dd8b917 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/security/ir.model.access.csv @@ -0,0 +1 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink diff --git a/odex25_pos/bi_pos_restrict_zero_qty/security/sample_security.xml b/odex25_pos/bi_pos_restrict_zero_qty/security/sample_security.xml new file mode 100644 index 000000000..d6f10be62 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/security/sample_security.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/1_pos_config.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/1_pos_config.png new file mode 100644 index 000000000..28aeba1c2 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/1_pos_config.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/2_onhand.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/2_onhand.png new file mode 100644 index 000000000..04272300d Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/2_onhand.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/3_warning.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/3_warning.png new file mode 100644 index 000000000..6d5898ede Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/3_warning.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/Banner.gif b/odex25_pos/bi_pos_restrict_zero_qty/static/description/Banner.gif new file mode 100644 index 000000000..02ce76750 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/Banner.gif differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/bi_logo.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/bi_logo.png new file mode 100644 index 000000000..e5d60b273 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/bi_logo.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/all_in_one_pos.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/all_in_one_pos.png new file mode 100644 index 000000000..e51fc57b3 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/all_in_one_pos.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/bi_generic_import.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/bi_generic_import.png new file mode 100644 index 000000000..785b6579f Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/bi_generic_import.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/branch.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/branch.png new file mode 100644 index 000000000..70209a610 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/branch.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/customer_overdue.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/customer_overdue.png new file mode 100644 index 000000000..b9efae230 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/customer_overdue.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/generic_excel_report.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/generic_excel_report.png new file mode 100644 index 000000000..4800329d7 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/generic_excel_report.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/sale_commision.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/sale_commision.png new file mode 100644 index 000000000..145289f73 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/demanded/sale_commision.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/5139322.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/5139322.png new file mode 100644 index 000000000..3664d289f Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/5139322.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/8021071.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/8021071.png new file mode 100644 index 000000000..6367ea9b2 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/features/8021071.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/icon.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/icon.png new file mode 100644 index 000000000..26b478c7d Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/icon.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/index.html b/odex25_pos/bi_pos_restrict_zero_qty/static/description/index.html new file mode 100644 index 000000000..000ca5d34 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/static/description/index.html @@ -0,0 +1,236 @@ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+

+ Point of Sales Restrict Zero Quantity Odoo App +

+

+ POS Order Line Restrict Zero Quantity Odoo Apps +

+

+ Point Of Sale Restrict Zero Quantity Odoo App helps users to prevent the sales of products with zero or negative stock levels, ensuring that businesses never run out of stock. Additionally, the app can be configured to display a warning message when the stock level of a product is getting low. When a customer attempts to purchase a product with a stock level below the minimum, the app will display an error message, preventing the sale from going through. +

+
+
+
+ +
+
+
+

Features

+
+
+
+
+
+ +
+
+

Restrict Zero Quantity Configuration

+ User have option to enable or disable zero quantity configuration. +
+
+
+
+
+
+ +
+
+

Zero Quantity Product Validation

+ Raise warning on point of sale if product quantity is zero. +
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+
+

Restrict Zero Quantity Configuration

+

User have option to enable and disable configuration for restrict zero quantity validatoin.

+ +
+
+
+ +
+
+
+

On Hand Qty

+

User can see product with zero on hand quantity.

+ +
+
+
+ +
+
+
+

Zero Quantity Product Validation

+

User can see warning when user selects product with zero quantity and click "Payment" button in point of sale screen.

+ +
+
+
+ +
+
+
+
+

Apps May You Like

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

Most Demanded Apps

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

Free Support

+

You will get 90 Days free support incase any bugs or issue (Except data recovery).

+

+ At BrowseInfo we offer end to end solution for Odoo services. Which includes analysis & consultation on the workflows and integration part. Please note that You're not allowed to distribute this module after purchase! Incase of any question regarding this module feel free to email us on ticket@browseinfo.in or raise a ticket on support. +

+
+
+
+ +
+
+
+
+ + + +
+
+ +
+
\ No newline at end of file diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_reprint_reorder.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_reprint_reorder.png new file mode 100644 index 000000000..9ca99d79c Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_reprint_reorder.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_return_order.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_return_order.png new file mode 100644 index 000000000..45aafd004 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_return_order.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_screen_margin.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_screen_margin.png new file mode 100644 index 000000000..186f259d1 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_screen_margin.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_warranty.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_warranty.png new file mode 100644 index 000000000..d6d803f1f Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/bi_pos_warranty.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_coupons_gift_voucher.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_coupons_gift_voucher.png new file mode 100644 index 000000000..8f7c9d436 Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_coupons_gift_voucher.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_home_delivery.png b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_home_delivery.png new file mode 100644 index 000000000..32b81aabd Binary files /dev/null and b/odex25_pos/bi_pos_restrict_zero_qty/static/description/related/pos_home_delivery.png differ diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/ProductScreen.js b/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/ProductScreen.js new file mode 100644 index 000000000..36f3b059f --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/ProductScreen.js @@ -0,0 +1,73 @@ +// BiProductScreen js +odoo.define('bi_pos_restrict_zero_qty.productScreen', function(require) { + "use strict"; + + const Registries = require('point_of_sale.Registries'); + const ProductScreen = require('point_of_sale.ProductScreen'); + var rpc = require('web.rpc') + + const BiProductScreen = (ProductScreen) => + class extends ProductScreen { + constructor() { + super(...arguments); + } + async _onClickPay() { + var self = this; + let order = this.env.pos.get_order(); + let lines = order.get_orderlines(); + let pos_config = self.env.pos.config; + let call_super = true; + var config_id=self.env.pos.config.id; + let prod_used_qty = {}; + let restrict = false; + if(pos_config.restrict_zero_qty){ + $.each(lines, function( i, line ){ + let prd = line.product; + if (prd.type == 'product'){ + if(prd.id in prod_used_qty){ + let old_qty = prod_used_qty[prd.id][1]; + prod_used_qty[prd.id] = [prd.qty_available,line.quantity+old_qty] + }else{ + prod_used_qty[prd.id] = [prd.qty_available,line.quantity] + } + } + if (prd.type == 'product'){ + if(prd.qty_available <= 0){ + restrict = true; + call_super = false; + let wrning = prd.display_name + ' is out of stock.'; + self.showPopup('ErrorPopup', { + title: self.env._t('Zero Quantity Not allowed'), + body: self.env._t(wrning), + }); + } + } + }); + if(restrict === false){ + $.each(prod_used_qty, function( i, pq ){ + let product = self.env.pos.db.get_product_by_id(i); + let check = pq[0] - pq[1]; + let wrning = product.display_name + ' is out of stock.'; + if (product.type == 'product'){ + if (check < 0){ + call_super = false; + self.showPopup('ErrorPopup', { + title: self.env._t('Deny Order'), + body: self.env._t(wrning), + }); + } + } + }); + } + } + if(call_super){ + super._onClickPay(); + } + } + }; + + Registries.Component.extend(ProductScreen, BiProductScreen); + + return ProductScreen; + +}); diff --git a/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/models.js b/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/models.js new file mode 100644 index 000000000..834b82956 --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/static/src/js/models.js @@ -0,0 +1,12 @@ +odoo.define('bi_pos_restrict_zero_qty.pos', function(require) { + "use strict"; + + const models = require('point_of_sale.models'); + var model_list = models.PosModel.prototype.models; + var product_model = null; + var exports = {}; + + models.load_fields('product.product', ['qty_available','type']); + + +}); diff --git a/odex25_pos/bi_pos_restrict_zero_qty/views/pos_assets_common.xml b/odex25_pos/bi_pos_restrict_zero_qty/views/pos_assets_common.xml new file mode 100644 index 000000000..15315b03c --- /dev/null +++ b/odex25_pos/bi_pos_restrict_zero_qty/views/pos_assets_common.xml @@ -0,0 +1,9 @@ + + +