diff --git a/website_pre_booking/README.rst b/website_pre_booking/README.rst new file mode 100644 index 000000000..ca1deddf6 --- /dev/null +++ b/website_pre_booking/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Website Pre Booking +=================== +This module will help you to managing prebooking management in website. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.odoo.com/documentation/15.0/legal/licenses.html) + +Credits +------- +Developer: (V15) Vishnu P, 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/website_pre_booking/__init__.py b/website_pre_booking/__init__.py new file mode 100644 index 000000000..b7b3161f2 --- /dev/null +++ b/website_pre_booking/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# 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 controllers +from . import models diff --git a/website_pre_booking/__manifest__.py b/website_pre_booking/__manifest__.py new file mode 100644 index 000000000..d7b1e9111 --- /dev/null +++ b/website_pre_booking/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# 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': 'Website Pre Booking', + 'version': '15.0.1.0.0', + 'category': 'Website', + 'summary': 'Allows pre booking option for website', + 'description': """This module will help you to managing prebooking of + product management in website""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['portal', 'website_sale'], + 'data': [ + 'security/ir.model.access.csv', + 'data/ir_sequence_data.xml', + 'views/portal_views.xml', + 'views/website_prebook_views.xml', + 'views/website_sale_inherit.xml', + 'views/prebook_details_template.xml', + 'views/pre_booking_template.xml', + 'views/product_template_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + '/website_pre_booking/static/src/css/prebooking.css', + '/website_pre_booking/static/src/js/pre_booking.js' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_pre_booking/controllers/__init__.py b/website_pre_booking/controllers/__init__.py new file mode 100644 index 000000000..6f7cf5d22 --- /dev/null +++ b/website_pre_booking/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# 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 pre_booking_portal +from . import website_pre_booking diff --git a/website_pre_booking/controllers/pre_booking_portal.py b/website_pre_booking/controllers/pre_booking_portal.py new file mode 100644 index 000000000..6b8dd4528 --- /dev/null +++ b/website_pre_booking/controllers/pre_booking_portal.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# 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 http, _ +from odoo.http import request +from odoo.addons.portal.controllers import portal + + +class CustomerPortal(portal.CustomerPortal): + """Used to manage a customer portal""" + def _prepare_home_portal_values(self, counters): + """Super the function to add new button in the home portal""" + values = super()._prepare_home_portal_values(counters) + if 'pre_bookings_count' in counters: + current_user = request.env['res.users'].sudo().browse( + request.env.uid) + pre_bookings_count = request.env['website.prebook'].search_count([('partner_id', '=', current_user.partner_id.id)]) + values['pre_bookings_count'] = pre_bookings_count + return values + + @http.route(['/my/pre_bookings'], type='http', auth="user", website=True) + def portal_my_pre_bookings(self, **kwargs): + """Function to view the logined user pre bookings in the account.""" + current_user = request.env['res.users'].sudo().browse(request.env.uid) + pre_booking = request.env['website.prebook'].sudo().search( + [('partner_id', '=', current_user.partner_id.id)]) + return request.render("website_pre_booking.portal_my_pre_bookings", + {'pre_bookings': pre_booking, + 'page_name': 'pre_booking'}) diff --git a/website_pre_booking/controllers/website_pre_booking.py b/website_pre_booking/controllers/website_pre_booking.py new file mode 100644 index 000000000..d94da5267 --- /dev/null +++ b/website_pre_booking/controllers/website_pre_booking.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, http, _ +from odoo.http import request + + +class CustomerPortal(http.Controller): + """Used to manage a customer portal""" + + @http.route(['/my/prebook_request/'], + type='http', auth="public", website=True) + def portal_my_employee_request(self, product, **kwargs): + """Pre-book button to pre-book the product""" + vals = { + 'product': product.id, + } + current_user = request.env['res.users'].sudo().browse( + request.session.uid) + partner = current_user.partner_id + product_qty = int(kwargs.get('prod_qty')) + if request.session.uid: + + pre_booking = request.env['website.prebook'].sudo().create({ + 'partner_id': partner.id, + 'booking_date': fields.datetime.today(), + 'product_id': product.id, + 'quantity': product_qty, + 'website_id': request.website.id, + }) + if pre_booking: + max_quantity = product.pre_max_quantity + product.sudo().write({'pre_max_quantity': int(max_quantity - product_qty)}) + + return request.render("website_pre_booking.pre_booking_done", + {'ref': pre_booking.reference}) + else: + return request.render("website_pre_booking.prebook_address", vals) + + @http.route(['/prebook/address'], type='http', methods=['GET', 'POST'], + auth="public", website=True, sitemap=False) + def pre_address(self, **kw): + """If not login, create a new user""" + product = request.env['product.template'].sudo().browse( + int(kw.get('product'))) + partner = request.env['res.partner'].sudo().create({ + 'name': kw.get('name'), + 'email': kw.get('email'), + 'phone': kw.get('phone'), + }) + pre_booking = request.env['website.prebook'].sudo().create({ + 'partner_id': partner.id, + 'booking_date': fields.datetime.today(), + 'product_id': product.id}) + if pre_booking: + max_quantity = product.pre_max_quantity + product.pre_max_quantity = max_quantity - 1 + return request.render("website_pre_booking.pre_booking_done", + {'ref': pre_booking.reference}) + + @http.route('/track/prebooking', website=True, auth='user', csrf=False) + def submit_booking(self, **kwargs): + """For tracking the specific pre-orders using refernce code""" + bookings = request.env['website.prebook'].sudo().search( + [('reference', '=', kwargs.get('reference'))]) + if bookings and bookings.sale_id: + if bookings.sale_id.state == 'draft': + state = 'Quotation' + elif bookings.sale_id.state == 'sent': + state = 'Quotation Sent' + elif bookings.sale_id.state == 'sale': + state = 'Sales Order' + elif bookings.sale_id.state == 'done': + state = 'Locked' + elif bookings.sale_id.state == 'cancel': + state = 'Cancelled' + vals = { + 'reference': bookings.reference, + 'product': bookings.product_id.name, + 'status': state if bookings.sale_id else bookings.state, + 'date': bookings.booking_date, + } + return request.render("website_pre_booking.my_booking_template", + vals) + else: + return request.render("website_pre_booking.my_booking_template", + {'vals': True}) + + @http.route(['/my/prebookings', '/my/prebookings/page/'], + type='http', auth="user", website=True) + def my_prebookings(self): + """Can track the pre bookings from the website""" + value = [] + values = {'value': value} + return request.render("website_pre_booking.my_booking_template", values) + + @http.route(['/sale/fail'], type='http', auth="user", website=True) + def my_prebookings_fail(self): + """Can track the pre bookings from the website""" + return request.render("website_pre_booking.pre_booking_failed") diff --git a/website_pre_booking/data/ir_sequence_data.xml b/website_pre_booking/data/ir_sequence_data.xml new file mode 100644 index 000000000..ba86b7113 --- /dev/null +++ b/website_pre_booking/data/ir_sequence_data.xml @@ -0,0 +1,13 @@ + + + + + + Pre Booking + prebook.sequence + PB + 4 + + + + \ No newline at end of file diff --git a/website_pre_booking/doc/RELEASE_NOTES.md b/website_pre_booking/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..e38f1a962 --- /dev/null +++ b/website_pre_booking/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 25.10.2024 +#### Version 15.0.1.0.0 +##### ADD +- Initial commit for Website Pre Booking diff --git a/website_pre_booking/models/__init__.py b/website_pre_booking/models/__init__.py new file mode 100644 index 000000000..5855d6c23 --- /dev/null +++ b/website_pre_booking/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import product_template +from . import website_prebook diff --git a/website_pre_booking/models/product_template.py b/website_pre_booking/models/product_template.py new file mode 100644 index 000000000..7238bf5b2 --- /dev/null +++ b/website_pre_booking/models/product_template.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class ProductTemplate(models.Model): + """ Class for inheriting product.template model to adding new fields""" + _inherit = 'product.template' + + pre_book = fields.Boolean(string='Pre Booking Available', + help='Enabling this field to identify the prebook') + from_date = fields.Date(string='From Date', + help='Prebook available from date') + to_date = fields.Date(string='To Date',help='Prebook available to date') + pre_max_quantity = fields.Integer(string="Pre Book Maximum Quantity", + help='Maximum quantity to pre book') diff --git a/website_pre_booking/models/website_prebook.py b/website_pre_booking/models/website_prebook.py new file mode 100644 index 000000000..78cd058f7 --- /dev/null +++ b/website_pre_booking/models/website_prebook.py @@ -0,0 +1,86 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Vishnu P() +# +# 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, _ + + +class WebsitePrebook(models.Model): + """ Class for defining website. Prebook model""" + _name = 'website.prebook' + _rec_name = 'reference' + + partner_id = fields.Many2one('res.partner', string="Customer", + help="Add the customer name") + booking_date = fields.Date('Booking Date', help="Pre booking date") + product_id = fields.Many2one('product.template', string="Product", + help="Add the product") + state = fields.Selection([ + ('draft', 'Draft'), + ('confirm', 'Confirmed'), + ], string='Status', default='draft', help="state of pre-booking" + ) + website_id = fields.Many2one( + "website", + string="Website", + ondelete="restrict", + index=True, + readonly=True, help="name of the website" + ) + reference = fields.Char(string='Reference', required=True, copy=False, + readonly=True, + default=lambda self: _('New')) + sale_id = fields.Many2one('sale.order', string='Sale order', + help="sale order") + quantity = fields.Integer(string='Quantity') + + @api.model + def create(self, vals): + """Supering create function for creating sequence""" + if vals.get('reference', _('New')) == _('New'): + vals['reference'] = self.env['ir.sequence'].next_by_code('prebook.sequence') or _('New') + return super(WebsitePrebook, self).create(vals) + + def action_confirm(self): + """Sale order creation while confirming the button""" + sale_order = self.env['sale.order'].create({ + 'partner_id': self.partner_id.id, + 'website_id': self.website_id.id, + 'order_line': [(0, 0, { + 'product_template_id': self.product_id.id, + 'product_id': self.product_id.product_variant_id.id, + 'name': self.product_id.product_variant_id.name, + 'product_uom_qty': self.quantity, + })], + }) + self.sale_id = sale_order.id + self.state = 'confirm' + + def action_view_sale_order(self): + """Smart button view function""" + return { + 'name': 'Sale Order', + 'view_mode': 'form', + 'view_type': 'form', + 'view_id': self.env.ref('sale.view_order_form').id, + 'res_id': self.sale_id.id, + 'res_model': 'sale.order', + 'type': 'ir.actions.act_window', + } diff --git a/website_pre_booking/security/ir.model.access.csv b/website_pre_booking/security/ir.model.access.csv new file mode 100644 index 000000000..1773d48d1 --- /dev/null +++ b/website_pre_booking/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_website_prebook,access.website.prebook,model_website_prebook,,1,1,1,1 diff --git a/website_pre_booking/static/description/assets/icons/check.png b/website_pre_booking/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/check.png differ diff --git a/website_pre_booking/static/description/assets/icons/chevron.png b/website_pre_booking/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/chevron.png differ diff --git a/website_pre_booking/static/description/assets/icons/cogs.png b/website_pre_booking/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/cogs.png differ diff --git a/website_pre_booking/static/description/assets/icons/consultation.png b/website_pre_booking/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/consultation.png differ diff --git a/website_pre_booking/static/description/assets/icons/ecom-black.png b/website_pre_booking/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/ecom-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/education-black.png b/website_pre_booking/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/education-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/hotel-black.png b/website_pre_booking/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/hotel-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/license.png b/website_pre_booking/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/license.png differ diff --git a/website_pre_booking/static/description/assets/icons/lifebuoy.png b/website_pre_booking/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/lifebuoy.png differ diff --git a/website_pre_booking/static/description/assets/icons/manufacturing-black.png b/website_pre_booking/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/pos-black.png b/website_pre_booking/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/pos-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/puzzle.png b/website_pre_booking/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/puzzle.png differ diff --git a/website_pre_booking/static/description/assets/icons/restaurant-black.png b/website_pre_booking/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/restaurant-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/service-black.png b/website_pre_booking/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/service-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/trading-black.png b/website_pre_booking/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/trading-black.png differ diff --git a/website_pre_booking/static/description/assets/icons/training.png b/website_pre_booking/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/training.png differ diff --git a/website_pre_booking/static/description/assets/icons/update.png b/website_pre_booking/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/update.png differ diff --git a/website_pre_booking/static/description/assets/icons/user.png b/website_pre_booking/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/user.png differ diff --git a/website_pre_booking/static/description/assets/icons/wrench.png b/website_pre_booking/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_pre_booking/static/description/assets/icons/wrench.png differ diff --git a/website_pre_booking/static/description/assets/misc/categories.png b/website_pre_booking/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/categories.png differ diff --git a/website_pre_booking/static/description/assets/misc/check-box.png b/website_pre_booking/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/check-box.png differ diff --git a/website_pre_booking/static/description/assets/misc/compass.png b/website_pre_booking/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/compass.png differ diff --git a/website_pre_booking/static/description/assets/misc/corporate.png b/website_pre_booking/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/corporate.png differ diff --git a/website_pre_booking/static/description/assets/misc/customer-support.png b/website_pre_booking/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/customer-support.png differ diff --git a/website_pre_booking/static/description/assets/misc/cybrosys-logo.png b/website_pre_booking/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_pre_booking/static/description/assets/misc/features.png b/website_pre_booking/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/features.png differ diff --git a/website_pre_booking/static/description/assets/misc/logo.png b/website_pre_booking/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/logo.png differ diff --git a/website_pre_booking/static/description/assets/misc/pictures.png b/website_pre_booking/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/pictures.png differ diff --git a/website_pre_booking/static/description/assets/misc/pie-chart.png b/website_pre_booking/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/pie-chart.png differ diff --git a/website_pre_booking/static/description/assets/misc/right-arrow.png b/website_pre_booking/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/right-arrow.png differ diff --git a/website_pre_booking/static/description/assets/misc/star.png b/website_pre_booking/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/star.png differ diff --git a/website_pre_booking/static/description/assets/misc/support.png b/website_pre_booking/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/support.png differ diff --git a/website_pre_booking/static/description/assets/misc/whatsapp.png b/website_pre_booking/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/website_pre_booking/static/description/assets/misc/whatsapp.png differ diff --git a/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk.png b/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk.png new file mode 100644 index 000000000..71a8a0edc Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk.png differ diff --git a/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk_dashboard.png b/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk_dashboard.png new file mode 100644 index 000000000..52b3f0233 Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/odoo_website_helpdesk_dashboard.png differ diff --git a/website_pre_booking/static/description/assets/modules/product_visibility_website.png b/website_pre_booking/static/description/assets/modules/product_visibility_website.png new file mode 100644 index 000000000..22e902092 Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/product_visibility_website.png differ diff --git a/website_pre_booking/static/description/assets/modules/website_multi_product_return_management.png b/website_pre_booking/static/description/assets/modules/website_multi_product_return_management.png new file mode 100644 index 000000000..9bd504b22 Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/website_multi_product_return_management.png differ diff --git a/website_pre_booking/static/description/assets/modules/website_product_attachments.png b/website_pre_booking/static/description/assets/modules/website_product_attachments.png new file mode 100644 index 000000000..ea1f49f20 Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/website_product_attachments.png differ diff --git a/website_pre_booking/static/description/assets/modules/website_return_management.png b/website_pre_booking/static/description/assets/modules/website_return_management.png new file mode 100644 index 000000000..c43739627 Binary files /dev/null and b/website_pre_booking/static/description/assets/modules/website_return_management.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/1.png b/website_pre_booking/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..5c51e6b77 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/1.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/2.png b/website_pre_booking/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..bb2ce7761 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/2.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/3.png b/website_pre_booking/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..7fe7e46b1 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/3.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/4.png b/website_pre_booking/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..33bd609cd Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/4.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/5.png b/website_pre_booking/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..8dc5d4ae6 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/5.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/6.png b/website_pre_booking/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..a902c4297 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/6.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/7.png b/website_pre_booking/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..85a19b13c Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/7.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif.zip b/website_pre_booking/static/description/assets/screenshots/gif.zip new file mode 100644 index 000000000..2a9fd789c Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif.zip differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/1.png b/website_pre_booking/static/description/assets/screenshots/gif/1.png new file mode 100644 index 000000000..5c51e6b77 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/1.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/2.png b/website_pre_booking/static/description/assets/screenshots/gif/2.png new file mode 100644 index 000000000..bb2ce7761 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/2.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/3.png b/website_pre_booking/static/description/assets/screenshots/gif/3.png new file mode 100644 index 000000000..7fe7e46b1 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/3.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/4.png b/website_pre_booking/static/description/assets/screenshots/gif/4.png new file mode 100644 index 000000000..33bd609cd Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/4.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/5.png b/website_pre_booking/static/description/assets/screenshots/gif/5.png new file mode 100644 index 000000000..8dc5d4ae6 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/5.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/6.png b/website_pre_booking/static/description/assets/screenshots/gif/6.png new file mode 100644 index 000000000..a902c4297 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/6.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/gif/7.png b/website_pre_booking/static/description/assets/screenshots/gif/7.png new file mode 100644 index 000000000..85a19b13c Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/gif/7.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/hero.gif b/website_pre_booking/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..2a09cf72f Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/hero.gif differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss1.png b/website_pre_booking/static/description/assets/screenshots/ss1.png new file mode 100644 index 000000000..5189afd27 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss1.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss3.png b/website_pre_booking/static/description/assets/screenshots/ss3.png new file mode 100644 index 000000000..0d0eebf3b Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss3.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss5.png b/website_pre_booking/static/description/assets/screenshots/ss5.png new file mode 100644 index 000000000..da7429274 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss5.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss6.png b/website_pre_booking/static/description/assets/screenshots/ss6.png new file mode 100644 index 000000000..36cd3c8d4 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss6.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss7.png b/website_pre_booking/static/description/assets/screenshots/ss7.png new file mode 100644 index 000000000..3c24cbebf Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss7.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss8.png b/website_pre_booking/static/description/assets/screenshots/ss8.png new file mode 100644 index 000000000..09984dba6 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss8.png differ diff --git a/website_pre_booking/static/description/assets/screenshots/ss9.png b/website_pre_booking/static/description/assets/screenshots/ss9.png new file mode 100644 index 000000000..06c4c5b86 Binary files /dev/null and b/website_pre_booking/static/description/assets/screenshots/ss9.png differ diff --git a/website_pre_booking/static/description/banner.jpg b/website_pre_booking/static/description/banner.jpg new file mode 100644 index 000000000..ae4e6a858 Binary files /dev/null and b/website_pre_booking/static/description/banner.jpg differ diff --git a/website_pre_booking/static/description/icon.png b/website_pre_booking/static/description/icon.png new file mode 100644 index 000000000..a12596a8d Binary files /dev/null and b/website_pre_booking/static/description/icon.png differ diff --git a/website_pre_booking/static/description/index.html b/website_pre_booking/static/description/index.html new file mode 100644 index 000000000..982d834b5 --- /dev/null +++ b/website_pre_booking/static/description/index.html @@ -0,0 +1,630 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Website Pre Booking

+

+ This module helps to pre-book the products in website.

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

+ Explore This + Module

+
+ + + +
+
+ +
+

+ Overview +

+
+
+
+ This module helps to pre-book the products in website. +
+
+ + +
+
+ +
+

+ Features +

+
+
+
+
+ + Manage the pre-booking orders in the website. +
+
+ + Track your Pre-bookings. +
+
+
+ + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Enable option from Product form page. +

+

+

+ +
+
+

+ Option for pre-booking

+ +
+
+

+ Success message .

+ +
+
+

+ User can view the details in customer portal. +

+ +
+
+

+ Pre Booking Orders Portal View. +

+ +
+ +
+

+ Pre Booking Orders Portal View. +

+ +
+ +
+

+ Pre Booked order. +

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

+ Related Products +

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

+ Our Services +

+
+
+
+
+
+ +
+
+ Odoo + Customization
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Support
+
+
+
+ +
+
+ Hire + Odoo + Developer
+
+
+
+ +
+
+ Odoo + Integration
+
+
+
+ +
+
+ Odoo + Migration
+
+
+
+ +
+
+ Odoo + Consultancy
+
+
+
+ +
+
+ Odoo + Implementation
+
+
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + +
+
+ +
+

+ Our + Industries +

+
+
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/website_pre_booking/static/src/css/prebooking.css b/website_pre_booking/static/src/css/prebooking.css new file mode 100644 index 000000000..4a4a46563 --- /dev/null +++ b/website_pre_booking/static/src/css/prebooking.css @@ -0,0 +1,223 @@ + +/* CSS */ +.button-40 { + background-color: #a31f2bbf; + border: 1px solid transparent; + box-sizing: border-box; + color: #FFFFFF; + cursor: pointer; + flex: 0 0 auto; + font-family: "Inter var",ui-sans-serif,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; + font-size: 1.125rem; + font-weight: 600; + line-height: 1.5rem; + padding: .75rem 1.2rem; + text-align: center; + text-decoration: none #6B7280 solid; + text-decoration-thickness: auto; + transition-duration: .2s; + transition-property: background-color,border-color,color,fill,stroke; + transition-timing-function: cubic-bezier(.4, 0, 0.2, 1); + user-select: none; + -webkit-user-select: none; + touch-action: manipulation; + width: auto; +} + +.button-40:hover { + background-color: #374151; +} + +.button-40:focus { + box-shadow: none; + outline: 2px solid transparent; + outline-offset: 2px; +} + +@media (min-width: 768px) { + .button-40 { + padding: .75rem 1.5rem; + } +} + + + +.leaderboard { + max-width: 490px; + width: 100%; + border-radius: 12px; + + header { + --start: 15%; + + height: 130px; + background-image: repeating-radial-gradient(circle at var(--start), transparent 0%, transparent 10%, rgba(54, 89, 219, .33) 10%, rgba(54, 89, 219, .33) 17%), linear-gradient(to right, #5b7cfa, #3659db); + color: #fff; + position: relative; + border-radius: 12px 12px 0 0; + overflow: hidden; + + .leaderboard__title { + position: absolute; + z-index: 2; + top: 50%; + right: calc(var(--start) * .75); + transform: translateY(-50%); + text-transform: uppercase; + margin: 0; + + span { + display: block; + } + + &--top { + font-size: 24px; + font-weight: 700; + letter-spacing: 6.5px; + } + + &--bottom { + font-size: 13px; + font-weight: 500; + letter-spacing: 3.55px; + opacity: .65; + transform: translateY(-2px); + } + } + + .leaderboard__icon { + fill: #fff; + opacity: .35; + width: 50px; + position: absolute; + top: 50%; + left: var(--start); + transform: translate(-50%, -50%); + } + } + + &__profiles { + background-color: #fff; + border-radius: 0 0 12px 12px; + padding: 15px 15px 20px; + display: grid; + row-gap: 8px; + } + + &__profile { + display: grid; + grid-template-columns: 1fr 3fr 1fr; + align-items: center; + padding: 10px 30px 10px 10px; + overflow: hidden; + border-radius: 10px; + box-shadow: 0 5px 7px -1px rgba(51, 51, 51, 0.23); + cursor: pointer; + transition: transform .25s cubic-bezier(.7,.98,.86,.98), box-shadow .25s cubic-bezier(.7,.98,.86,.98); + background-color: #fff; + + &:hover { + transform: scale(1.2); + box-shadow: 0 9px 47px 11px rgba(51, 51, 51, 0.18); + } + } + + &__picture { + max-width: 100%; + width: 60px; + border-radius: 50%; + box-shadow: 0 0 0 10px #ebeef3, 0 0 0 22px #f3f4f6; + } + + &__name { + color: #979cb0; + font-weight: 600; + font-size: 20px; + letter-spacing: 0.64px; + margin-left: 12px; + } + + &__value { + color: #35d8ac; + font-weight: 700; + font-size: 34px; + text-align: right; + + & > span { + opacity: .8; + font-weight: 600; + font-size: 13px; + margin-left: 3px; + } + } +} + + + + +// bare minimuu styles + +body { + margin: 0; + background-color: #eaeaea; + display: grid; + height: 100vh; + place-items: center; + font-family: 'Source Sans Pro', sans-serif; +} + +.leaderboard { + box-shadow: 0 0 40px -10px rgba(0, 0, 0, .4); +} + +.o_image { + height:122px; + width:81px; +} + +body{ + background: #f2f2f2; + font-family: 'Open Sans', sans-serif; +} + +.search { + width: 100%; + position: relative; + display: flex; +} + +.searchTerm { + width: 100%; + border: 3px solid #00B4CC; + border-right: none; + padding: 5px; + height: 36px; + border-radius: 5px 0 0 5px; + outline: none; + color: #000000; +} + +.searchTerm:focus{ + color: #000000; +} + +.searchButton { + width: 40px; + height: 36px; + border: 1px solid #00B4CC; + background: #00B4CC; + text-align: center; + color: #fff; + border-radius: 0 5px 5px 0; + cursor: pointer; + font-size: 20px; +} + +/*Resize the wrap to see the search bar change!*/ +.wrap{ + width: 19%; + position: absolute; + top: 30%; + left: 50%; + transform: translate(-50%, -50%); +} \ No newline at end of file diff --git a/website_pre_booking/static/src/js/pre_booking.js b/website_pre_booking/static/src/js/pre_booking.js new file mode 100644 index 000000000..99f0f53e7 --- /dev/null +++ b/website_pre_booking/static/src/js/pre_booking.js @@ -0,0 +1,25 @@ +/** @odoo-module **/ + +import publicWidget from 'web.public.widget'; + +publicWidget.registry.WebsiteSalePrebooking = publicWidget.Widget.extend({ + selector: '#product_detail', + events:{ + 'click .pre_booking': '_preBooking', + }, + + + _preBooking: function (ev) { + let pre_max_qty = parseFloat($(ev.currentTarget).data('id')); + let add_qty_value = parseFloat($('.quantity').val()); + if (!isNaN(pre_max_qty) && !isNaN(add_qty_value)) { + if (pre_max_qty >= add_qty_value) { + window.location = $(ev.currentTarget).val()+'&prod_qty='+add_qty_value + } else { + window.location = '/sale/fail'; + } + } + } + +}); + diff --git a/website_pre_booking/views/portal_views.xml b/website_pre_booking/views/portal_views.xml new file mode 100644 index 000000000..cf06be28b --- /dev/null +++ b/website_pre_booking/views/portal_views.xml @@ -0,0 +1,56 @@ + + + + + + + + + + diff --git a/website_pre_booking/views/pre_booking_template.xml b/website_pre_booking/views/pre_booking_template.xml new file mode 100644 index 000000000..21ff23762 --- /dev/null +++ b/website_pre_booking/views/pre_booking_template.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/website_pre_booking/views/prebook_details_template.xml b/website_pre_booking/views/prebook_details_template.xml new file mode 100644 index 000000000..c9b16437e --- /dev/null +++ b/website_pre_booking/views/prebook_details_template.xml @@ -0,0 +1,69 @@ + + + + + Track PreBookings + /my/prebookings + + 31 + + + + diff --git a/website_pre_booking/views/product_template_views.xml b/website_pre_booking/views/product_template_views.xml new file mode 100644 index 000000000..5bec8928a --- /dev/null +++ b/website_pre_booking/views/product_template_views.xml @@ -0,0 +1,24 @@ + + + + + + product.template.view.form.inherit.website.pre.booking + + product.template + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/website_pre_booking/views/website_prebook_views.xml b/website_pre_booking/views/website_prebook_views.xml new file mode 100644 index 000000000..cca1073fa --- /dev/null +++ b/website_pre_booking/views/website_prebook_views.xml @@ -0,0 +1,94 @@ + + + + + website.prebook.view.form + website.prebook + +
+
+
+ +
+ +
+
+

+ +

+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + website.prebook.view.tree + website.prebook + + + + + + + + + + + + + Pre Bookings + ir.actions.act_window + website.prebook + tree,kanban,form + +

+ Create! +

+
+
+ + + Pre Bookings + ir.actions.act_window + website.prebook + tree,kanban,form + +

+ Create! +

+
+
+ + +
diff --git a/website_pre_booking/views/website_sale_inherit.xml b/website_pre_booking/views/website_sale_inherit.xml new file mode 100644 index 000000000..549c85bd8 --- /dev/null +++ b/website_pre_booking/views/website_sale_inherit.xml @@ -0,0 +1,18 @@ + + + + +