diff --git a/website_appointment_payment/README.rst b/website_appointment_payment/README.rst new file mode 100644 index 000000000..006894783 --- /dev/null +++ b/website_appointment_payment/README.rst @@ -0,0 +1,48 @@ +.. 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 APPOINTMENT PAYMENT +=========================== +* You can configure the payments from the Website. +Configuration +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +* Developer: (V16) NIHALA KP, 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 +-------- +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com" + +Further Information +----------- +HTML Description: ``__ + + diff --git a/website_appointment_payment/__init__.py b/website_appointment_payment/__init__.py new file mode 100644 index 000000000..ecc550e72 --- /dev/null +++ b/website_appointment_payment/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 +from . import controllers diff --git a/website_appointment_payment/__manifest__.py b/website_appointment_payment/__manifest__.py new file mode 100644 index 000000000..49131f663 --- /dev/null +++ b/website_appointment_payment/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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': 'Website Appointment Payment', + 'version': '16.0.1.0.0', + 'category': 'Website', + 'summary': 'Payment before confirming the Appointment in Website', + 'description': """We can do the Payment in online appointment in website""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website', 'appointment', 'sale', 'base'], + 'data': [ + 'security/ir.model.access.csv', + 'data/appoinment_product_demo.xml', + 'views/appointment_product_view.xml', + 'views/appointment_template_registration.xml', + 'views/website_appointment_template.xml', + 'views/website_appointment_payment_template.xml', + 'views/appointment_info_template.xml', + ], + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_appointment_payment/controllers/__init__.py b/website_appointment_payment/controllers/__init__.py new file mode 100644 index 000000000..1379f58dd --- /dev/null +++ b/website_appointment_payment/controllers/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 payment +from . import appointment diff --git a/website_appointment_payment/controllers/appointment.py b/website_appointment_payment/controllers/appointment.py new file mode 100644 index 000000000..e0dc77475 --- /dev/null +++ b/website_appointment_payment/controllers/appointment.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 . +# +############################################################################# +import pytz +from dateutil.relativedelta import relativedelta +from werkzeug.exceptions import NotFound +from odoo import fields, http +from odoo.http import request +from odoo.addons.appointment.controllers.appointment import \ + AppointmentController +from odoo.addons.base.models.ir_qweb import keep_query +from odoo.addons.payment import utils + + +class AppointmentAccountPayment(AppointmentController): + + @http.route() + def appointment_form_submit( + self, appointment_type_id, datetime_str, duration_str, + staff_user_id, name, phone, email, **kwargs + ): + """ Override: when a payment step is necessary, we create the appointment + booking model to store all relevant information + instead of creating a calendar.event. It will + be transformed to a calendar.event on payment (or confirmation). + See make_event on appointment.booking. + Redirects to payment if needed. See redirect_to_payment""" + if kwargs.get('invite_token'): + appointment_invite_id = request.env[ + 'appointment.invite'].sudo().search( + [('access_token', '=', kwargs.get('invite_token'))]).id + else: + appointment_invite_id = False + appointment = request.env['appointment.type'].browse( + appointment_type_id) + timezone = request.session.get('timezone') or appointment.appointment_tz + tz_session = pytz.timezone(timezone) + date_start = tz_session.localize( + fields.Datetime.from_string(datetime_str)).astimezone( + pytz.utc).replace( + tzinfo=None) + duration = float(duration_str) + date_end = date_start + relativedelta(hours=duration) + if appointment.has_payment_step and appointment.product_id.lst_price: + appointment_booking = request.env[ + 'appointment.booking'].sudo().create([{ + 'appointment_type_id': appointment_type_id, + 'appointment_invite_id': appointment_invite_id, + 'name': name, + 'product_id': appointment.product_id.id, + 'staff_user_id': staff_user_id, + 'start': date_start, + 'duration': duration, + 'stop': date_end, + }]) + return self.redirect_to_payment(appointment_booking) + return super().appointment_form_submit( + appointment_type_id, datetime_str, duration_str, staff_user_id, + name, phone, email, **kwargs + ) + + def redirect_to_payment(self, appointment_booking): + """Booking Page is redirected to Payment Page""" + invoice_id = appointment_booking.sudo().make_invoice() + if not invoice_id: + raise NotFound() + return request.redirect( + "/payment/pay?appointment_type_id={aid}&invoice_id={" + "iid}&partner_id={pid}&amount={amount}&access_token={token}&{" + "args}".format( + aid=appointment_booking.appointment_type_id.id, + iid=invoice_id.id, + pid=appointment_booking.partner_id.id, + amount=invoice_id.amount_total, + token=utils.generate_access_token(invoice_id.partner_id.id, + invoice_id.amount_total, + invoice_id.currency_id.id), + args=keep_query('*') + )) diff --git a/website_appointment_payment/controllers/payment.py b/website_appointment_payment/controllers/payment.py new file mode 100644 index 000000000..acd6c7b8b --- /dev/null +++ b/website_appointment_payment/controllers/payment.py @@ -0,0 +1,93 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 werkzeug.exceptions import NotFound +from odoo import http +from odoo.addons.payment.controllers import portal +from odoo.addons.base.models.ir_qweb import keep_query +from odoo.http import request + + +class AppointmentAccountPaymentPortal(portal.PaymentPortal): + + @http.route( + '/appointment//invoice//post_payment', + type='http', auth="public", website=True, sitemap=False) + def appointment(self, invoice_token): + """if event is created its is redirected to appointment confirmation + page""" + invoice_sudo = request.env['account.move'].sudo().search( + [('access_token', '=', invoice_token)], limit=1) + if not invoice_sudo: + raise NotFound() + booking = invoice_sudo.calendar_booking_ids + if not booking: + raise NotFound() + if booking.calender_event_id: + return request.redirect( + "/calendar/view/{event_token}?partner_id={pid}&{args}".format( + event_token=booking.calender_event_id.access_token, + pid=invoice_sudo.partner_id.id, + args=keep_query('*') + )) + return request.redirect( + f"/calendar_booking/{booking.booking_token}/view?{keep_query('*')}") + + def _get_custom_rendering_context_values(self, **kwargs): + """appointment details are added to rendering the page""" + rendering_context_values = super()._get_custom_rendering_context_values( + **kwargs) + appointment_type_id = self._cast_as_int( + kwargs.get('appointment_type_id')) + if not appointment_type_id: + return rendering_context_values + invoice_sudo = request.env['account.move'].sudo().browse( + int(kwargs.get('invoice_id'))).exists() + if not invoice_sudo or not invoice_sudo.calendar_booking_ids: + raise NotFound() + booking_sudo = invoice_sudo.calendar_booking_ids[0] + appointment_type_sudo = booking_sudo.appointment_type_id + if (booking_sudo.calender_event_id or not appointment_type_sudo or + appointment_type_sudo.id != appointment_type_id): + raise NotFound() + invoice_token = invoice_sudo._portal_ensure_token() + rendering_context_values.update({ + 'access_token': invoice_token, + 'appointment_type': appointment_type_sudo, + 'booking': booking_sudo, + 'cancel_booking_route': f"/calendar_booking/{booking_sudo.booking_token}/cancel?{keep_query('*')}", + 'invoice_state': invoice_sudo.payment_state, + 'landing_route': "/appointment/{aid}/invoice/{" + "inv_token}/post_payment?partner_id={pid}".format( + aid=appointment_type_sudo.id, + inv_token=invoice_token, + pid=invoice_sudo.partner_id.id, + ), + 'transaction_route': f'/invoice/transaction/{invoice_sudo.id}', + }) + return rendering_context_values + + def _get_payment_page_template_xmlid(self, **kwargs): + """Redirected to payment page""" + if kwargs.get('appointment_type_id'): + return 'website_appointment_payment.appointment_payment' + return super()._get_payment_page_template_xmlid(**kwargs) diff --git a/website_appointment_payment/data/appoinment_product_demo.xml b/website_appointment_payment/data/appoinment_product_demo.xml new file mode 100644 index 000000000..6673a0469 --- /dev/null +++ b/website_appointment_payment/data/appoinment_product_demo.xml @@ -0,0 +1,19 @@ + + + + + + + Booking Fees + + + Booking Fees + 0.00 + + 50.00 + booking_fees + + + + + diff --git a/website_appointment_payment/doc/RELEASE_NOTES.md b/website_appointment_payment/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..dd310f99d --- /dev/null +++ b/website_appointment_payment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 19.04.2024 +#### Version 16.0.1.0.0 +#### ADD +- Initial Commit Website Appointment Payment diff --git a/website_appointment_payment/models/__init__.py b/website_appointment_payment/models/__init__.py new file mode 100644 index 000000000..2f5f2e0d6 --- /dev/null +++ b/website_appointment_payment/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 account_move +from . import appointment_booking +from . import appointment_booking_line +from . import appointment_price +from . import product_template diff --git a/website_appointment_payment/models/account_move.py b/website_appointment_payment/models/account_move.py new file mode 100644 index 000000000..a98426924 --- /dev/null +++ b/website_appointment_payment/models/account_move.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 fields, models + + +class AccountMove(models.Model): + """When an invoice is paid,an event is created to corresponding booking""" + _inherit = "account.move" + + calendar_booking_ids = fields.One2many("appointment.booking", + "account_move_id", + string="Meeting Booking", + help="shows the appointment " + "booking related to the " + "invoice") + + def _invoice_paid_hook(self): + """when invoice is paid, create event from calendar booking""" + res = super()._invoice_paid_hook() + self.calendar_booking_ids.make_event() + return res diff --git a/website_appointment_payment/models/appointment_booking.py b/website_appointment_payment/models/appointment_booking.py new file mode 100644 index 000000000..a7ded44a9 --- /dev/null +++ b/website_appointment_payment/models/appointment_booking.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 models, fields, Command +import uuid + + +class AppointmentBooking(models.Model): + """This model is used to store information for bookings""" + _name = "appointment.booking" + + def _default_booking_token(self): + """Used for the token generation""" + return uuid.uuid4().hex + + account_move_id = fields.Many2one('account.move', + help="Invoice linked with appointment") + product_id = fields.Many2one('product.product', required=True, + help="Booking product") + staff_user_id = fields.Many2one('res.users', 'Operator', help="Staff user") + name = fields.Char('Customer Name', help="Customer name") + appointment_type_id = fields.Many2one('appointment.type', + ondelete="cascade", required=True, + help="Appointment related with " + "booking") + start = fields.Datetime('Start', required=True, help="Starting time") + stop = fields.Datetime('Start', required=True, help="Ending Time") + duration = fields.Float('Duration', help="Duration of the appointment") + partner_id = fields.Many2one('res.partner', 'Contact', help="Customer") + calender_event_id = fields.Many2one('calendar.event', + help="Event created for booking") + booking_line_ids = fields.One2many('appointment.booking.line', + 'calendar_booking_id', + string="Booking Lines", + help="Appointment booking lines") + booking_token = fields.Char('Access Token', default=_default_booking_token, + readonly=True, help="To generate booking token") + appointment_invite_id = fields.Many2one('appointment.invite', + help="Appointment linked with " + "appointment invite") + + def make_invoice(self): + """Create invoice when booking is created""" + return self.env['account.move'].create([{ + 'calendar_booking_ids': [Command.link(booking.id)], + 'invoice_line_ids': [Command.create({ + 'display_type': 'product', + 'product_id': booking.product_id.id, + 'quantity': 1.0, + })], + 'move_type': 'out_invoice', + 'partner_id': 1, + } for booking in self]) + + def make_event(self): + """create event when invoice is created""" + for booking in self: + meeting = self.env['calendar.event'].sudo().create({ + 'name': booking.appointment_type_id.name, + 'location': booking.appointment_type_id.location, + 'start': booking.start, + 'stop': booking.stop, + 'duration': booking.duration, + 'appointment_type_id': booking.appointment_type_id.id, + 'user_id': booking.staff_user_id.id, + }) + booking.calender_event_id = meeting diff --git a/website_appointment_payment/models/appointment_booking_line.py b/website_appointment_payment/models/appointment_booking_line.py new file mode 100644 index 000000000..81dc187ff --- /dev/null +++ b/website_appointment_payment/models/appointment_booking_line.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 fields, models + + +class AppointmentBookingLine(models.Model): + _name = "appointment.booking.line" + _order = "create_date DESC, id DESC" + _rec_name = "calendar_booking_id" + + calendar_booking_id = fields.Many2one('appointment.booking', + 'Meeting Booking', ondelete='cascade', + help="Appointment booking linked " + "with appointment booking line", + required=True) diff --git a/website_appointment_payment/models/appointment_price.py b/website_appointment_payment/models/appointment_price.py new file mode 100644 index 000000000..bfbb5243e --- /dev/null +++ b/website_appointment_payment/models/appointment_price.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 models, fields + + +class AppointmentPrice(models.Model): + """this is used to inherit the appointment.type model to add some custom + fields""" + _inherit = 'appointment.type' + + has_payment_step = fields.Boolean("Up-front Payment", + help="Require visitors to pay to " + "confirm their booking") + product_id = fields.Many2one( + 'product.product', string="Product", + help="Product configured for appointment booking", + domain=[('detailed_type', '=', 'booking_fees')], + readonly=False, store=True) diff --git a/website_appointment_payment/models/product_template.py b/website_appointment_payment/models/product_template.py new file mode 100644 index 000000000..0f080ac2a --- /dev/null +++ b/website_appointment_payment/models/product_template.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions (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 fields, models + + +class ProductTemplate(models.Model): + """new product type is added for appointment booking""" + _inherit = "product.template" + + detailed_type = fields.Selection(selection_add=[ + ('booking_fees', 'Booking Fees'), + ], help="Added new detailed type for appointment booking", + ondelete={'booking_fees': 'set service'}) + + def _detailed_type_mapping(self): + """Added a new product type for appointment booking""" + type_mapping = super()._detailed_type_mapping() + type_mapping['booking_fees'] = 'service' + return type_mapping diff --git a/website_appointment_payment/security/ir.model.access.csv b/website_appointment_payment/security/ir.model.access.csv new file mode 100644 index 000000000..4fddb101e --- /dev/null +++ b/website_appointment_payment/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink +access_appointment_booking,access_appointment_booking,model_appointment_booking,base.group_user,1,1,1,1 +access_appointment_booking_line,access_appointment_booking_line,model_appointment_booking_line,base.group_user,1,1,1,1 \ No newline at end of file diff --git a/website_appointment_payment/static/description/assets/icons/check.png b/website_appointment_payment/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/check.png differ diff --git a/website_appointment_payment/static/description/assets/icons/chevron.png b/website_appointment_payment/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/chevron.png differ diff --git a/website_appointment_payment/static/description/assets/icons/cogs.png b/website_appointment_payment/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/cogs.png differ diff --git a/website_appointment_payment/static/description/assets/icons/consultation.png b/website_appointment_payment/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/consultation.png differ diff --git a/website_appointment_payment/static/description/assets/icons/ecom-black.png b/website_appointment_payment/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/ecom-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/education-black.png b/website_appointment_payment/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/education-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/hotel-black.png b/website_appointment_payment/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/hotel-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/license.png b/website_appointment_payment/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/license.png differ diff --git a/website_appointment_payment/static/description/assets/icons/lifebuoy.png b/website_appointment_payment/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/lifebuoy.png differ diff --git a/website_appointment_payment/static/description/assets/icons/manufacturing-black.png b/website_appointment_payment/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/pos-black.png b/website_appointment_payment/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/pos-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/puzzle.png b/website_appointment_payment/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/puzzle.png differ diff --git a/website_appointment_payment/static/description/assets/icons/restaurant-black.png b/website_appointment_payment/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/restaurant-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/service-black.png b/website_appointment_payment/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/service-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/trading-black.png b/website_appointment_payment/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/trading-black.png differ diff --git a/website_appointment_payment/static/description/assets/icons/training.png b/website_appointment_payment/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/training.png differ diff --git a/website_appointment_payment/static/description/assets/icons/update.png b/website_appointment_payment/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/update.png differ diff --git a/website_appointment_payment/static/description/assets/icons/user.png b/website_appointment_payment/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/user.png differ diff --git a/website_appointment_payment/static/description/assets/icons/wrench.png b/website_appointment_payment/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_appointment_payment/static/description/assets/icons/wrench.png differ diff --git a/website_appointment_payment/static/description/assets/misc/categories.png b/website_appointment_payment/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/categories.png differ diff --git a/website_appointment_payment/static/description/assets/misc/check-box.png b/website_appointment_payment/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/check-box.png differ diff --git a/website_appointment_payment/static/description/assets/misc/compass.png b/website_appointment_payment/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/compass.png differ diff --git a/website_appointment_payment/static/description/assets/misc/corporate.png b/website_appointment_payment/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/corporate.png differ diff --git a/website_appointment_payment/static/description/assets/misc/customer-support.png b/website_appointment_payment/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/customer-support.png differ diff --git a/website_appointment_payment/static/description/assets/misc/cybrosys-logo.png b/website_appointment_payment/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_appointment_payment/static/description/assets/misc/features.png b/website_appointment_payment/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/features.png differ diff --git a/website_appointment_payment/static/description/assets/misc/logo.png b/website_appointment_payment/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/logo.png differ diff --git a/website_appointment_payment/static/description/assets/misc/pictures.png b/website_appointment_payment/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/pictures.png differ diff --git a/website_appointment_payment/static/description/assets/misc/pie-chart.png b/website_appointment_payment/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/pie-chart.png differ diff --git a/website_appointment_payment/static/description/assets/misc/right-arrow.png b/website_appointment_payment/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/right-arrow.png differ diff --git a/website_appointment_payment/static/description/assets/misc/star.png b/website_appointment_payment/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/star.png differ diff --git a/website_appointment_payment/static/description/assets/misc/support.png b/website_appointment_payment/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/support.png differ diff --git a/website_appointment_payment/static/description/assets/misc/whatsapp.png b/website_appointment_payment/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/website_appointment_payment/static/description/assets/misc/whatsapp.png differ diff --git a/website_appointment_payment/static/description/assets/modules/1.png b/website_appointment_payment/static/description/assets/modules/1.png new file mode 100644 index 000000000..e90228872 Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/1.png differ diff --git a/website_appointment_payment/static/description/assets/modules/2.png b/website_appointment_payment/static/description/assets/modules/2.png new file mode 100644 index 000000000..fa478cd14 Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/2.png differ diff --git a/website_appointment_payment/static/description/assets/modules/3.png b/website_appointment_payment/static/description/assets/modules/3.png new file mode 100644 index 000000000..45afa2b89 Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/3.png differ diff --git a/website_appointment_payment/static/description/assets/modules/4.png b/website_appointment_payment/static/description/assets/modules/4.png new file mode 100644 index 000000000..9b58fa3ec Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/4.png differ diff --git a/website_appointment_payment/static/description/assets/modules/5.png b/website_appointment_payment/static/description/assets/modules/5.png new file mode 100644 index 000000000..79dc3bf08 Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/5.png differ diff --git a/website_appointment_payment/static/description/assets/modules/6.jpg b/website_appointment_payment/static/description/assets/modules/6.jpg new file mode 100755 index 000000000..2b7aaa6d2 Binary files /dev/null and b/website_appointment_payment/static/description/assets/modules/6.jpg differ diff --git a/website_appointment_payment/static/description/assets/screenshots/hero1.gif b/website_appointment_payment/static/description/assets/screenshots/hero1.gif new file mode 100644 index 000000000..a31e12a8f Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/hero1.gif differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot1.png b/website_appointment_payment/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..0504cb8a7 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot1.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot10.png b/website_appointment_payment/static/description/assets/screenshots/screenshot10.png new file mode 100644 index 000000000..6866d470f Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot10.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot2.png b/website_appointment_payment/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..c0758eb46 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot2.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot3.png b/website_appointment_payment/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..e1017a738 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot3.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot4.png b/website_appointment_payment/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..d7ea019fe Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot4.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot5.png b/website_appointment_payment/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..8ab3dc1c3 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot5.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot6.png b/website_appointment_payment/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..f5b0be3f9 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot6.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot7.png b/website_appointment_payment/static/description/assets/screenshots/screenshot7.png new file mode 100644 index 000000000..36a5ad7b0 Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot7.png differ diff --git a/website_appointment_payment/static/description/assets/screenshots/screenshot8.png b/website_appointment_payment/static/description/assets/screenshots/screenshot8.png new file mode 100644 index 000000000..cb38e41fd Binary files /dev/null and b/website_appointment_payment/static/description/assets/screenshots/screenshot8.png differ diff --git a/website_appointment_payment/static/description/banner.png b/website_appointment_payment/static/description/banner.png new file mode 100644 index 000000000..fbe7f6578 Binary files /dev/null and b/website_appointment_payment/static/description/banner.png differ diff --git a/website_appointment_payment/static/description/icon.png b/website_appointment_payment/static/description/icon.png new file mode 100644 index 000000000..4eb1fa039 Binary files /dev/null and b/website_appointment_payment/static/description/icon.png differ diff --git a/website_appointment_payment/static/description/index.html b/website_appointment_payment/static/description/index.html new file mode 100644 index 000000000..9ae599b8f --- /dev/null +++ b/website_appointment_payment/static/description/index.html @@ -0,0 +1,568 @@ +
+ +
+ +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Website Appointment Payment

+

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ By using this module you can pay the appointment booking fees from the website +
+
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + You can configure a product for appointment booking fees +
+
+ + You can see the appointment fees in the appointment card +
+
+ + You can complete the payment from website +
+ +
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+
+

Enable the payment option

+

+ From Website > Configuration > Online Appointments > options , you can enable the checkbox to configure website payments.

+ +
+
+

Product configuration

+

+ When you enable the checkbox, you'll be able to view the products configured for booking. Additionally, if you wish to configure the payment provider, you can do so from there as well.

+ +
+
+

Schedule the appointment

+

+ While scheduling appointments on the website, you can also view the booking fees within the appointment information.

+ +
+
+

select the date

+ + +
+ +
+

Proceed to Payment

+

We've enabled the upfront payment option, which adds an extra step to proceed to payment before confirming the appointment.

+ +
+ +
+

Select the Payment provider

+

Choose the Payment provider and complete the payment

+ +
+ +
+

Payment in Progress

+ +
+
+

Payment Completed

+

Payment has been completed, and we can now view the booking information.

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

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_appointment_payment/views/appointment_info_template.xml b/website_appointment_payment/views/appointment_info_template.xml new file mode 100644 index 000000000..fd0d8630d --- /dev/null +++ b/website_appointment_payment/views/appointment_info_template.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/website_appointment_payment/views/appointment_product_view.xml b/website_appointment_payment/views/appointment_product_view.xml new file mode 100644 index 000000000..445aac683 --- /dev/null +++ b/website_appointment_payment/views/appointment_product_view.xml @@ -0,0 +1,37 @@ + + + + + + appointment.type.view.product.form + appointment.type + + + + + + + + \ No newline at end of file diff --git a/website_appointment_payment/views/appointment_template_registration.xml b/website_appointment_payment/views/appointment_template_registration.xml new file mode 100644 index 000000000..58355acd1 --- /dev/null +++ b/website_appointment_payment/views/appointment_template_registration.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/website_appointment_payment/views/website_appointment_payment_template.xml b/website_appointment_payment/views/website_appointment_payment_template.xml new file mode 100644 index 000000000..baa1a1938 --- /dev/null +++ b/website_appointment_payment/views/website_appointment_payment_template.xml @@ -0,0 +1,86 @@ + + + + + \ No newline at end of file diff --git a/website_appointment_payment/views/website_appointment_template.xml b/website_appointment_payment/views/website_appointment_template.xml new file mode 100644 index 000000000..b9dd9e843 --- /dev/null +++ b/website_appointment_payment/views/website_appointment_template.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file