diff --git a/portal_stock_check/README.rst b/portal_stock_check/README.rst new file mode 100755 index 000000000..c53dcb210 --- /dev/null +++ b/portal_stock_check/README.rst @@ -0,0 +1,41 @@ +Portal Product Availability +=========================== +* Portal Product Availability + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/13.0/legal/licenses/licenses.html) + +Company +------- +* 'Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: +sruthi mk @ cybrosys + +Contacts +-------- +* Mail Contact : odoo@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 +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +Further information +=================== +HTML Description: ``__ + diff --git a/portal_stock_check/__init__.py b/portal_stock_check/__init__.py new file mode 100755 index 000000000..8bdd72834 --- /dev/null +++ b/portal_stock_check/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import controller diff --git a/portal_stock_check/__manifest__.py b/portal_stock_check/__manifest__.py new file mode 100755 index 000000000..cdb15682f --- /dev/null +++ b/portal_stock_check/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +{ + 'name': "Portal Product Availability", + 'version': '16.0.1.0.0', + 'category': 'Sales', + 'summary': """Portal Product Availability""", + 'description': """Portal Users Can Check The Availability of Products""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'images': ['static/description/banner.png'], + 'license': 'LGPL-3', + 'depends': ['portal', 'sale_management', 'stock', 'contacts', + 'website_sale'], + + 'data': [ + 'views/portal_inherited.xml', + ], + + 'assets': { + 'web.assets_frontend': [ + 'portal_stock_check/static/src/js/search_products.js', + 'portal_stock_check/static/src/xml/product_list.xml' + ], + }, + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/portal_stock_check/controller/__init__.py b/portal_stock_check/controller/__init__.py new file mode 100755 index 000000000..63493d7bf --- /dev/null +++ b/portal_stock_check/controller/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + +from . import products diff --git a/portal_stock_check/controller/products.py b/portal_stock_check/controller/products.py new file mode 100755 index 000000000..00ea44526 --- /dev/null +++ b/portal_stock_check/controller/products.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# 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 +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# + + +from odoo import http, _ +from odoo.http import request +from odoo.addons.portal.controllers import portal + + +class CustomerPortal(portal.CustomerPortal): + + def _prepare_home_portal_values(self, counters): + values = super()._prepare_home_portal_values(counters) + """Set the count as None""" + + if 'p_count' in counters: + values['p_count'] = None + return values + + @http.route('/my/products', type='http', auth="user", website=True) + def portal_products(self, **kw): + """Adding stock check option in portal""" + return request.render("portal_stock_check.portal_product_availability") + + @http.route('/product/search', type='json', auth="user", website=True) + def search_product(self, **kw, ): + """To get corresponding products""" + product = kw.get('name') + if product: + res = request.env['product.product'].sudo().search_read( + [('name', 'ilike', product), ('is_published', '=', True)]) + return res + else: + return False diff --git a/portal_stock_check/doc/RELEASE_NOTES.md b/portal_stock_check/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..d51c0748d --- /dev/null +++ b/portal_stock_check/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 04.04.2023 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit for portal_stock_check diff --git a/portal_stock_check/static/description/assets/icons/check.png b/portal_stock_check/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/check.png differ diff --git a/portal_stock_check/static/description/assets/icons/chevron.png b/portal_stock_check/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/chevron.png differ diff --git a/portal_stock_check/static/description/assets/icons/cogs.png b/portal_stock_check/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/cogs.png differ diff --git a/portal_stock_check/static/description/assets/icons/consultation.png b/portal_stock_check/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/consultation.png differ diff --git a/portal_stock_check/static/description/assets/icons/ecom-black.png b/portal_stock_check/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/ecom-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/education-black.png b/portal_stock_check/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/education-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/hotel-black.png b/portal_stock_check/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/hotel-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/license.png b/portal_stock_check/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/license.png differ diff --git a/portal_stock_check/static/description/assets/icons/lifebuoy.png b/portal_stock_check/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/lifebuoy.png differ diff --git a/portal_stock_check/static/description/assets/icons/logo (1).png b/portal_stock_check/static/description/assets/icons/logo (1).png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/logo (1).png differ diff --git a/portal_stock_check/static/description/assets/icons/manufacturing-black.png b/portal_stock_check/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/manufacturing-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/pos-black.png b/portal_stock_check/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/pos-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/puzzle.png b/portal_stock_check/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/puzzle.png differ diff --git a/portal_stock_check/static/description/assets/icons/restaurant-black.png b/portal_stock_check/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/restaurant-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/service-black.png b/portal_stock_check/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/service-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/trading-black.png b/portal_stock_check/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/trading-black.png differ diff --git a/portal_stock_check/static/description/assets/icons/training.png b/portal_stock_check/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/training.png differ diff --git a/portal_stock_check/static/description/assets/icons/update.png b/portal_stock_check/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/update.png differ diff --git a/portal_stock_check/static/description/assets/icons/user.png b/portal_stock_check/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/user.png differ diff --git a/portal_stock_check/static/description/assets/icons/wrench.png b/portal_stock_check/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/portal_stock_check/static/description/assets/icons/wrench.png differ diff --git a/portal_stock_check/static/description/assets/modules/1.png b/portal_stock_check/static/description/assets/modules/1.png new file mode 100755 index 000000000..3ad04ecfd Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/1.png differ diff --git a/portal_stock_check/static/description/assets/modules/2.png b/portal_stock_check/static/description/assets/modules/2.png new file mode 100755 index 000000000..499b1a72f Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/2.png differ diff --git a/portal_stock_check/static/description/assets/modules/3.png b/portal_stock_check/static/description/assets/modules/3.png new file mode 100755 index 000000000..5238bdeab Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/3.png differ diff --git a/portal_stock_check/static/description/assets/modules/4.png b/portal_stock_check/static/description/assets/modules/4.png new file mode 100755 index 000000000..7f2815273 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/4.png differ diff --git a/portal_stock_check/static/description/assets/modules/5.png b/portal_stock_check/static/description/assets/modules/5.png new file mode 100755 index 000000000..cfb5be33c Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/5.png differ diff --git a/portal_stock_check/static/description/assets/modules/6.png b/portal_stock_check/static/description/assets/modules/6.png new file mode 100755 index 000000000..f01b10060 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/6.png differ diff --git a/portal_stock_check/static/description/assets/modules/approval_image.png b/portal_stock_check/static/description/assets/modules/approval_image.png new file mode 100755 index 000000000..84fe94e80 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/approval_image.png differ diff --git a/portal_stock_check/static/description/assets/modules/dynamic_image.png b/portal_stock_check/static/description/assets/modules/dynamic_image.png new file mode 100755 index 000000000..f55c47e0f Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/dynamic_image.png differ diff --git a/portal_stock_check/static/description/assets/modules/list_view_image.png b/portal_stock_check/static/description/assets/modules/list_view_image.png new file mode 100755 index 000000000..510d36ae9 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/list_view_image.png differ diff --git a/portal_stock_check/static/description/assets/modules/multiple_ref_image.png b/portal_stock_check/static/description/assets/modules/multiple_ref_image.png new file mode 100755 index 000000000..3fe90e552 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/multiple_ref_image.png differ diff --git a/portal_stock_check/static/description/assets/modules/print_image.png b/portal_stock_check/static/description/assets/modules/print_image.png new file mode 100755 index 000000000..b470725a1 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/print_image.png differ diff --git a/portal_stock_check/static/description/assets/modules/product_return_image.png b/portal_stock_check/static/description/assets/modules/product_return_image.png new file mode 100755 index 000000000..3afc14722 Binary files /dev/null and b/portal_stock_check/static/description/assets/modules/product_return_image.png differ diff --git a/portal_stock_check/static/description/assets/screenshots/1.png b/portal_stock_check/static/description/assets/screenshots/1.png new file mode 100755 index 000000000..a0a9aee5c Binary files /dev/null and b/portal_stock_check/static/description/assets/screenshots/1.png differ diff --git a/portal_stock_check/static/description/assets/screenshots/2.png b/portal_stock_check/static/description/assets/screenshots/2.png new file mode 100755 index 000000000..74ff15e5a Binary files /dev/null and b/portal_stock_check/static/description/assets/screenshots/2.png differ diff --git a/portal_stock_check/static/description/assets/screenshots/hero.gif b/portal_stock_check/static/description/assets/screenshots/hero.gif new file mode 100755 index 000000000..074b85eeb Binary files /dev/null and b/portal_stock_check/static/description/assets/screenshots/hero.gif differ diff --git a/portal_stock_check/static/description/banner.png b/portal_stock_check/static/description/banner.png new file mode 100644 index 000000000..683d40cc0 Binary files /dev/null and b/portal_stock_check/static/description/banner.png differ diff --git a/portal_stock_check/static/description/icon.png b/portal_stock_check/static/description/icon.png new file mode 100644 index 000000000..e6fce1663 Binary files /dev/null and b/portal_stock_check/static/description/icon.png differ diff --git a/portal_stock_check/static/description/index.html b/portal_stock_check/static/description/index.html new file mode 100755 index 000000000..57d346e35 --- /dev/null +++ b/portal_stock_check/static/description/index.html @@ -0,0 +1,549 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+
+
+
+ +
+
+
+

+ Portal Product Availability

+

+ Portal Users Can Check The Availability of Products +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ With the help of this App portal users can easily check the stock availability of products.

+ +
+
+ +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Product stock check

+

+ Portal users can check the availability of products.

+
+
+ + +
+ +
+
+

+ Screenshots +

+
+ +
+

+ Product availability check in Portal

+ + +
+ +
+

+ Search Result

+ + +
+ + +
+ + +
+
+

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/portal_stock_check/static/src/js/search_products.js b/portal_stock_check/static/src/js/search_products.js new file mode 100755 index 000000000..48cab1f57 --- /dev/null +++ b/portal_stock_check/static/src/js/search_products.js @@ -0,0 +1,32 @@ +odoo.define('portal_Stock_check.portal_product_availability', function (require) { + 'use strict'; +var publicWidget = require('web.public.widget'); +var core = require('web.core'); +var core = require('web.core'); +var QWeb = core.qweb; +var ajax = require('web.ajax'); + + +publicWidget.registry.SearchBar = publicWidget.Widget.extend({ + selector: '.o_website_product_search', + + events: { + 'keyup .o_portal_product_input': '_product_search', + }, + init: function () { + this._super.apply(this, arguments); + }, + _product_search: function (ev) { + var product_name = $('#product_name_input').val(); + ajax.jsonRpc("/product/search", 'call', { + 'name' : product_name + }).then(function (result) { + if (result != 'false'){ + $('.product_results_table').html(QWeb.render('productSearch',{'result':result})); + } + }) + } + }) +}) + + diff --git a/portal_stock_check/static/src/xml/product_list.xml b/portal_stock_check/static/src/xml/product_list.xml new file mode 100755 index 000000000..889175853 --- /dev/null +++ b/portal_stock_check/static/src/xml/product_list.xml @@ -0,0 +1,27 @@ + + + +
+ + + + + + + + + + + + + + + +
ProductQuantity
+ + + +
+
+
+
diff --git a/portal_stock_check/views/portal_inherited.xml b/portal_stock_check/views/portal_inherited.xml new file mode 100755 index 000000000..2945e13fe --- /dev/null +++ b/portal_stock_check/views/portal_inherited.xml @@ -0,0 +1,43 @@ + + + + + + \ No newline at end of file