diff --git a/odoo_parking_management/README.rst b/odoo_parking_management/README.rst new file mode 100644 index 000000000..a13242808 --- /dev/null +++ b/odoo_parking_management/README.rst @@ -0,0 +1,42 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Parking Management +================== +This module is developed for managing the vehicle parking and providing the +parking tickets for any type of customers. + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V17): Vishnu kp, Contact : odoo@cybrosys.com + +License +------- +* Lesser General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +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/odoo_parking_management/__init__.py b/odoo_parking_management/__init__.py new file mode 100644 index 000000000..9051e6aa8 --- /dev/null +++ b/odoo_parking_management/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from . import models +from . import wizard diff --git a/odoo_parking_management/__manifest__.py b/odoo_parking_management/__manifest__.py new file mode 100644 index 000000000..8581e66bc --- /dev/null +++ b/odoo_parking_management/__manifest__.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################. +{ + 'name': 'Parking Management', + 'version': '17.0.1.0.0', + 'category': 'Industries', + 'summary': 'Manage the parking of vehicles', + 'description': """This module is developed for managing the vehicle + parking and providing the parking tickets for any type of customers.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': [ + 'base', + 'fleet', + 'account' + ], + 'data': [ + 'security/odoo_parking_management_groups.xml', + 'security/parking_entry_security.xml', + 'security/ir.model.access.csv', + 'data/report_paperformat_data.xml', + 'data/ir_sequence_data.xml', + 'report/parking_ticket_report_templates.xml', + 'wizard/register_payment_views.xml', + 'views/parking_entry_views.xml', + 'views/slot_type_views.xml', + 'views/location_details_views.xml', + 'views/slot_details_views.xml', + 'views/member_slot_reservation_views.xml', + 'views/vehicle_details_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': True, +} diff --git a/odoo_parking_management/data/ir_sequence_data.xml b/odoo_parking_management/data/ir_sequence_data.xml new file mode 100644 index 000000000..054cab7c7 --- /dev/null +++ b/odoo_parking_management/data/ir_sequence_data.xml @@ -0,0 +1,21 @@ + + + + + + Public Parking Entry + public.parking.entry + PUBLIC/PARKING/ + 5 + + + + + Private Parking Entry + private.parking.entry + MEMBER/PARKING/ + 5 + + + + diff --git a/odoo_parking_management/data/report_paperformat_data.xml b/odoo_parking_management/data/report_paperformat_data.xml new file mode 100644 index 000000000..cefdd6aa7 --- /dev/null +++ b/odoo_parking_management/data/report_paperformat_data.xml @@ -0,0 +1,19 @@ + + + + + Gate Pass + + custom + 120 + 70 + Portrait + 40 + 5 + 5 + 5 + + 40 + 90 + + diff --git a/odoo_parking_management/doc/RELEASE_NOTES.md b/odoo_parking_management/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..d2474c836 --- /dev/null +++ b/odoo_parking_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.12.2023 +#### Version 17.0.1.0.0 +#### ADD +- Initial commit for Parking Management diff --git a/odoo_parking_management/models/__init__.py b/odoo_parking_management/models/__init__.py new file mode 100644 index 000000000..43e29d184 --- /dev/null +++ b/odoo_parking_management/models/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import slot_type +from . import location_details +from . import slot_details +from . import member_slot_reservation +from . import vehicle_details +from . import parking_entry diff --git a/odoo_parking_management/models/location_details.py b/odoo_parking_management/models/location_details.py new file mode 100644 index 000000000..8792a5818 --- /dev/null +++ b/odoo_parking_management/models/location_details.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class LocationDetails(models.Model): + """Details for a location""" + _name = 'location.details' + _description = 'Location Details' + + name = fields.Char(string='Locations', required=True, + help='Name of the location') diff --git a/odoo_parking_management/models/member_slot_reservation.py b/odoo_parking_management/models/member_slot_reservation.py new file mode 100644 index 000000000..642510dfa --- /dev/null +++ b/odoo_parking_management/models/member_slot_reservation.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class MemberSlotReservation(models.Model): + """Details for MemberSlotReservation""" + _name = 'member.slot.reservation' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _rec_name = 'slot_id' + _description = 'Member Slot Reservation' + + slot_id = fields.Many2one('slot.details', string='Slot', + tracking=True, + required=True, + help='Field for the ID of the slot') + partner_id = fields.Many2one('res.partner', string='Member', + tracking=True, required=True, + help='Field for Reserved Member') + start_date = fields.Date(string='Start Date', tracking=True, + required=True, + help='Field for adding the start date') + end_date = fields.Date(string='End Date', tracking=True, required=True, + help='Field for adding end date') diff --git a/odoo_parking_management/models/parking_entry.py b/odoo_parking_management/models/parking_entry.py new file mode 100644 index 000000000..90f3cbf13 --- /dev/null +++ b/odoo_parking_management/models/parking_entry.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +import datetime +from odoo import api, fields, models, _ + + +class ParkingEntry(models.Model): + """Details about the Parking""" + _name = 'parking.entry' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Public Park Entry' + + name = fields.Char(string='Reference', readonly=True, + default=lambda self: _('New'), + help='Field for the sequence of parking entries') + partner_id = fields.Many2one('res.partner', string='Contact', + tracking=True, help='Field for customer') + mobile = fields.Char(related='partner_id.phone', string='Mobile', + store=True, readonly=False, + help='Mobile number of customer') + email = fields.Char(related='partner_id.email', string='Email', + store=True, readonly=False, + help='E-mail of customer') + check_in = fields.Datetime(string='Check In', readonly=True, + tracking=True, help='Check In time of the ' + 'vehicle for parking') + vehicle_id = fields.Many2one('vehicle.details', string='Vehicle', + tracking=True, required=True, + help='Vehicle of Customer') + vehicle_number = fields.Char(related='vehicle_id.number_plate', + string='Vehicle Number', store=True, + readonly=False, tracking=True, + help='Vehicle number of customer') + slot_type_id = fields.Many2one('slot.type', string='Slot Type', + tracking=True, required=True, + help='Slot type fr the vehicle') + slot_id = fields.Many2one('slot.details', string='Slot', + tracking=True, + required=True, + help='Slot assigned for vehicle of Customer') + user_id = fields.Many2one('res.users', string='Created By', + default=lambda self: self.env.user, + tracking=True, + help='Field for user that entries are created') + created_date = fields.Datetime(string='Created Datetime', + default=lambda self: fields.Datetime.now(), + tracking=True, + help='Date which entry was created') + check_out = fields.Datetime(string='Check Out', readonly=True, + tracking=True, help='Check Out time of vehicle') + duration = fields.Float(string='Duration', compute='_compute_duration', + store=True, help='Time spent by the vehicles') + customer_type = fields.Selection( + [('private', 'Private'), ('public', 'Public')], + string='Type', default='public', + tracking=True, required=True, + help='Type of the customer') + company_id = fields.Many2one('res.company', string='Company', + default=lambda self: self.env.company, + help='Name of the company') + location_id = fields.Many2one('location.details', + string='Location', + tracking=True, required=True, + help='Name of the location') + state = fields.Selection([('draft', 'Draft'), + ('check_in', 'Check In'), + ('check_out', ' Check Out'), + ('payment', 'Payment')], + string='Status', default='draft', tracking=True, + help='Status of the vehicle', copy=False) + currency_id = fields.Many2one('res.currency', string='Currency', + related='company_id.currency_id', + help='Currency used by the company') + parking_cost = fields.Monetary(string='Parking Cost', tracking=True, + help='Cost for the parking.') + check_in_bool = fields.Boolean(string='Check In Bool', + default=False, + copy=False, + help='Check if checked in.') + check_out_bool = fields.Boolean(string='Check Out Bool', + default=False, + copy=False, + help='Check if checked out.') + paid_bool = fields.Boolean(string='Paid Bool', + default=False, + copy=False, + help='Check if paid.') + + @api.model + def create(self, values): + """Method for generating the sequence for public and private users""" + res = super(ParkingEntry, self).create(values) + if res.customer_type == "private": + res['name'] = self.env['ir.sequence'].next_by_code( + 'private.parking.entry') + if res.customer_type == 'public': + res['name'] = self.env['ir.sequence'].next_by_code( + 'public.parking.entry') + return res + + @api.depends('check_out') + def _compute_duration(self): + """Method for computing the duration of checking in and checking out + of vehicles""" + for rec in self: + rec.duration = False + if rec.check_out: + entry = datetime.datetime.strptime(str(rec.check_in), + "%Y-%m-%d %H:%M:%S") + out = datetime.datetime.strptime(str(rec.check_out), + "%Y-%m-%d %H:%M:%S") + dur_dif = out - entry + dur = dur_dif.total_seconds() + dur_hour = str(datetime.timedelta(seconds=dur)) + vals = dur_hour.split(':') + t, hours = divmod(float(vals[0]), 24) + t, minutes = divmod(float(vals[1]), 60) + minutes = minutes / 60.0 + rec.duration = hours + minutes + + @api.onchange('slot_type_id') + def onchange_slot_type_id(self): + """Method for changing the slot type""" + domain = {'slot_id': [('slot_type_id', '=', self.slot_type_id.id)]} + return {'domain': domain} + + def action_check_in(self): + """Method for checking in""" + self.state = 'check_in' + self.check_in_bool = True + self.check_out_bool = False + self.check_in = fields.Datetime.now() + + def action_check_out(self): + """Method for checking out""" + self.state = 'check_out' + self.check_out_bool = True + self.check_in_bool = False + self.check_out = fields.Datetime.now() + + def action_register_payment(self): + """Method for viewing the wizard for register payment""" + view_id = self.env.ref('odoo_parking_management' + '.register_payment_wizard_view_form').id + return { + 'name': 'Register Payment', + 'type': 'ir.actions.act_window', + 'view_mode': 'form', + 'res_model': 'register.payment.wizard', + 'views': [(view_id, 'form')], + 'context': { + 'default_partner_id': self.partner_id.id, + 'default_parking_duration': self.duration, + 'default_amount': self.parking_cost, + 'default_ref': self.name + }, + 'target': 'new', + } diff --git a/odoo_parking_management/models/slot_details.py b/odoo_parking_management/models/slot_details.py new file mode 100644 index 000000000..8fe4071d9 --- /dev/null +++ b/odoo_parking_management/models/slot_details.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from odoo import fields, models + + +class SlotDetails(models.Model): + """Details for Slot""" + _name = 'slot.details' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _description = 'Details about slot' + + code = fields.Char(string='Code', tracking=True, required=True, + help='Unique identifier for slot') + name = fields.Char(string='Name', required=True, + help='Name of the slot') + slot_type_id = fields.Many2one('slot.type', string='Slot Type', + tracking=True, required=True, + help='Type of the slot') diff --git a/odoo_parking_management/models/slot_type.py b/odoo_parking_management/models/slot_type.py new file mode 100644 index 000000000..934ac4d2c --- /dev/null +++ b/odoo_parking_management/models/slot_type.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from odoo import fields, models + + +class SlotType(models.Model): + """Details of slot type""" + _name = 'slot.type' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _rec_name = 'vehicle_type' + _description = 'Slot Type' + + vehicle_type = fields.Char(string='Name', required=True, + tracking=True, help='Name of vehicle') + code = fields.Char(string='Code', tracking=True, + help='Unique identifier for vehicle') + allowed_park_duration = fields.Float(string='Allowed Parking Time', + help='Time allowed for the vehicle') diff --git a/odoo_parking_management/models/vehicle_details.py b/odoo_parking_management/models/vehicle_details.py new file mode 100644 index 000000000..c53309e71 --- /dev/null +++ b/odoo_parking_management/models/vehicle_details.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from odoo import fields, models + + +class VehicleDetails(models.Model): + """Details of Vehicle""" + _name = 'vehicle.details' + _inherit = ['mail.thread', 'mail.activity.mixin'] + _rec_name = 'vehicle_name' + _description = 'Vehicle Details' + + vehicle_name = fields.Char(string='Name', + help='Field for the sequence of parking entries') + vehicle_id = fields.Many2one('fleet.vehicle', string='Vehicle', + tracking=True, required=True, + help='Name of vehicle') + partner_id = fields.Many2one('res.partner', string='Owner', + tracking=True, help=' Name of Partner') + number_plate = fields.Char(string='Number Plate', tracking=True, + required=True, help='Number for the vehicle') + ownership_type = fields.Selection([('outsider', 'Outsider'), + ('member', 'Member')], + string='Ownership Type', tracking=True, + required=True, help='Type of the owner ' + 'of vehicle') diff --git a/odoo_parking_management/report/parking_ticket_report_templates.xml b/odoo_parking_management/report/parking_ticket_report_templates.xml new file mode 100644 index 000000000..103bab2f5 --- /dev/null +++ b/odoo_parking_management/report/parking_ticket_report_templates.xml @@ -0,0 +1,71 @@ + + + + + + + Parking Ticket Report + parking.entry + qweb-pdf + odoo_parking_management.parking_ticket + odoo_parking_management.parking_ticket + + report + + + diff --git a/odoo_parking_management/security/ir.model.access.csv b/odoo_parking_management/security/ir.model.access.csv new file mode 100644 index 000000000..22e75af2a --- /dev/null +++ b/odoo_parking_management/security/ir.model.access.csv @@ -0,0 +1,8 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_slot_type,access.slot.type,model_slot_type,base.group_user,1,1,1,1 +access_location_details,access.location.details,model_location_details,base.group_user,1,1,1,1 +access_slot_details,access.slot.details,model_slot_details,base.group_user,1,1,1,1 +access_member_slot_reservation,access.member.slot.reservation,model_member_slot_reservation,base.group_user,1,1,1,1 +access_vehicle_details,access.vehicle.details,model_vehicle_details,base.group_user,1,1,1,1 +access_parking_entry,access.parking.entry,model_parking_entry,base.group_user,1,1,1,1 +access_register_payment_wizard,access.register.payment.wizard,model_register_payment_wizard,base.group_user,1,1,1,1 diff --git a/odoo_parking_management/security/odoo_parking_management_groups.xml b/odoo_parking_management/security/odoo_parking_management_groups.xml new file mode 100644 index 000000000..3200e63b9 --- /dev/null +++ b/odoo_parking_management/security/odoo_parking_management_groups.xml @@ -0,0 +1,21 @@ + + + + + Parking Management + Category for Parking Management + + + + User + + + + + Manager + + + + diff --git a/odoo_parking_management/security/parking_entry_security.xml b/odoo_parking_management/security/parking_entry_security.xml new file mode 100644 index 000000000..45b686a5e --- /dev/null +++ b/odoo_parking_management/security/parking_entry_security.xml @@ -0,0 +1,21 @@ + + + + + View Own Docs + + ['|',('user_id', '=', user.id),('create_uid', + '=', user.id)] + + + + + + View All Docs + + [(1, '=', 1)] + + + diff --git a/odoo_parking_management/static/description/assets/icons/capture (1).png b/odoo_parking_management/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/capture (1).png differ diff --git a/odoo_parking_management/static/description/assets/icons/check.png b/odoo_parking_management/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/check.png differ diff --git a/odoo_parking_management/static/description/assets/icons/chevron.png b/odoo_parking_management/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/chevron.png differ diff --git a/odoo_parking_management/static/description/assets/icons/cogs.png b/odoo_parking_management/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/cogs.png differ diff --git a/odoo_parking_management/static/description/assets/icons/consultation.png b/odoo_parking_management/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/consultation.png differ diff --git a/odoo_parking_management/static/description/assets/icons/ecom-black.png b/odoo_parking_management/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/ecom-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/education-black.png b/odoo_parking_management/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/education-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/hotel-black.png b/odoo_parking_management/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/hotel-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/img.png b/odoo_parking_management/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/img.png differ diff --git a/odoo_parking_management/static/description/assets/icons/license.png b/odoo_parking_management/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/license.png differ diff --git a/odoo_parking_management/static/description/assets/icons/lifebuoy.png b/odoo_parking_management/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/lifebuoy.png differ diff --git a/odoo_parking_management/static/description/assets/icons/manufacturing-black.png b/odoo_parking_management/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/manufacturing-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/photo-capture.png b/odoo_parking_management/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/photo-capture.png differ diff --git a/odoo_parking_management/static/description/assets/icons/pos-black.png b/odoo_parking_management/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/pos-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/puzzle.png b/odoo_parking_management/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/puzzle.png differ diff --git a/odoo_parking_management/static/description/assets/icons/restaurant-black.png b/odoo_parking_management/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/restaurant-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/service-black.png b/odoo_parking_management/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/service-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/trading-black.png b/odoo_parking_management/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/trading-black.png differ diff --git a/odoo_parking_management/static/description/assets/icons/training.png b/odoo_parking_management/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/training.png differ diff --git a/odoo_parking_management/static/description/assets/icons/update.png b/odoo_parking_management/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/update.png differ diff --git a/odoo_parking_management/static/description/assets/icons/user.png b/odoo_parking_management/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/user.png differ diff --git a/odoo_parking_management/static/description/assets/icons/wrench.png b/odoo_parking_management/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/odoo_parking_management/static/description/assets/icons/wrench.png differ diff --git a/odoo_parking_management/static/description/assets/misc/Cybrosys R.png b/odoo_parking_management/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/Cybrosys R.png differ diff --git a/odoo_parking_management/static/description/assets/misc/email.svg b/odoo_parking_management/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/phone.svg b/odoo_parking_management/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/odoo_parking_management/static/description/assets/misc/star (1) 2.svg b/odoo_parking_management/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/support (1) 1.svg b/odoo_parking_management/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/support-email.svg b/odoo_parking_management/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/tick-mark.svg b/odoo_parking_management/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/whatsapp 1.svg b/odoo_parking_management/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/misc/whatsapp.svg b/odoo_parking_management/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/odoo_parking_management/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/odoo_parking_management/static/description/assets/modules/1.png b/odoo_parking_management/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/1.png differ diff --git a/odoo_parking_management/static/description/assets/modules/2.png b/odoo_parking_management/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/2.png differ diff --git a/odoo_parking_management/static/description/assets/modules/3.png b/odoo_parking_management/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/3.png differ diff --git a/odoo_parking_management/static/description/assets/modules/4.png b/odoo_parking_management/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/4.png differ diff --git a/odoo_parking_management/static/description/assets/modules/5.png b/odoo_parking_management/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/5.png differ diff --git a/odoo_parking_management/static/description/assets/modules/6.png b/odoo_parking_management/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/6.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/Parking_entry.png b/odoo_parking_management/static/description/assets/screenshots/Parking_entry.png new file mode 100644 index 000000000..9b1bf4152 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/Parking_entry.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/after_payment.png b/odoo_parking_management/static/description/assets/screenshots/after_payment.png new file mode 100644 index 000000000..3c4d8df07 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/after_payment.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/checkin.png b/odoo_parking_management/static/description/assets/screenshots/checkin.png new file mode 100644 index 000000000..8c2d89afe Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/checkin.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/checkout.png b/odoo_parking_management/static/description/assets/screenshots/checkout.png new file mode 100644 index 000000000..69125e6e2 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/checkout.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/configuration_page.png b/odoo_parking_management/static/description/assets/screenshots/configuration_page.png new file mode 100644 index 000000000..6f34eba10 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/configuration_page.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/hero.gif b/odoo_parking_management/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..d4a0c8e21 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/hero.gif differ diff --git a/odoo_parking_management/static/description/assets/screenshots/kanban_view.png b/odoo_parking_management/static/description/assets/screenshots/kanban_view.png new file mode 100644 index 000000000..84b0b554c Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/kanban_view.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/payment.png b/odoo_parking_management/static/description/assets/screenshots/payment.png new file mode 100644 index 000000000..17943235e Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/payment.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/report.png b/odoo_parking_management/static/description/assets/screenshots/report.png new file mode 100644 index 000000000..d93b286b3 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/report.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/reporting.png b/odoo_parking_management/static/description/assets/screenshots/reporting.png new file mode 100644 index 000000000..5e9582279 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/reporting.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/slot_menu.png b/odoo_parking_management/static/description/assets/screenshots/slot_menu.png new file mode 100644 index 000000000..40699206c Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/slot_menu.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/user.png b/odoo_parking_management/static/description/assets/screenshots/user.png new file mode 100644 index 000000000..878b87c2a Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/user.png differ diff --git a/odoo_parking_management/static/description/banner.jpg b/odoo_parking_management/static/description/banner.jpg new file mode 100644 index 000000000..cd62a577c Binary files /dev/null and b/odoo_parking_management/static/description/banner.jpg differ diff --git a/odoo_parking_management/static/description/icon.png b/odoo_parking_management/static/description/icon.png new file mode 100644 index 000000000..be29043b0 Binary files /dev/null and b/odoo_parking_management/static/description/icon.png differ diff --git a/odoo_parking_management/static/description/index.html b/odoo_parking_management/static/description/index.html new file mode 100644 index 000000000..bf898c4b7 --- /dev/null +++ b/odoo_parking_management/static/description/index.html @@ -0,0 +1,744 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo SH +
+
+
+
+
+
+

+ Parking Management

+

+ A Perfect Vehicle Parking Management +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

Odoo 17 Community & Enterprise Edition Support.

+

Parking Management system in Odoo 17 Community & Enterprise Edition. +

+
+
+
+
+
+
+ +
+
+

User and Manager Level Access

+

Set the Manager and User in settings. +

+
+
+
+
+
+
+ +
+
+

Two Type of Parking Section

+

Create private/public parking entry. +

+
+
+
+
+
+
+ +
+
+

Parking Report

+

Displays Report Based on the all Parking Entries. +

+
+
+
+
+
+
+ +
+
+

Slot Availability Status

+

Create Slots and make them allocated and not allocated. +

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

+ User Access Level

+
+ Choose the Access Level For the Module
+
+
+
+
+
+
+ +
+
+

+ Form View

+
+ Parking Entry form view After Filling the Form Click on the Check In Button.
+
+
+
+
+
+
+ +
+
+

+ Checked in Page

+
+ After Check In you Will Redirect to the Page Having Check Out Button.
+
+
+
+
+
+
+ +
+
+

+ Check Out Page

+
+ After Check out you Will Redirect to the Page Having Register Payment Button.
+
+
+
+
+
+
+ +
+
+

+ Payment Wizard

+
+ Clicking on the Register Payment Button Will Open The Payment Filing Wizard.
+
+
+
+
+
+
+ +
+
+

+ After Payment Page.

+
+ After Payment Your Page will Show the Ribbon With Paid Status.
+
+
+
+
+
+
+ +
+
+

+ Parking Ticket.

+
+ User can Download the Parking Ticket.
+
+
+
+
+
+
+ +
+
+

+ Kanban View.

+ +
+
+
+
+
+
+ +
+
+

+ Slots Menu.

+ +
+
+
+
+
+
+ +
+
+

+ Configuration Page.

+
+ User can Set up The Module Configuration Here.
+
+
+
+
+
+
+ +
+
+

+ Reporting page.

+
+ User can Set up The Reporting Tab.
+
+
+
+
+
+
+
    +
  • + User and Manager Level Access. +
  • +
  • + Two Type of Parking Section. +
  • +
  • + Displays Report Based on the all Parking Entries. +
  • + +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:29th Dec 2023 +
+

+ + Odoo 17 Parking Management.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + diff --git a/odoo_parking_management/views/location_details_views.xml b/odoo_parking_management/views/location_details_views.xml new file mode 100644 index 000000000..c2008793b --- /dev/null +++ b/odoo_parking_management/views/location_details_views.xml @@ -0,0 +1,33 @@ + + + + + location.details.view.tree + location.details + + + + + + + + + Location + ir.actions.act_window + location.details + tree + {'search_default_available':1} + +

+ Create Your First Location +

+
+
+ + +
diff --git a/odoo_parking_management/views/member_slot_reservation_views.xml b/odoo_parking_management/views/member_slot_reservation_views.xml new file mode 100644 index 000000000..19041e495 --- /dev/null +++ b/odoo_parking_management/views/member_slot_reservation_views.xml @@ -0,0 +1,62 @@ + + + + + member.slot.reservation.view.tree + member.slot.reservation + + + + + + + + + + + + member.slot.reservation.view.form + member.slot.reservation + +
+ + + + + + + + + + + + +
+ + + +
+
+
+
+ + + Member Slot Reservations + ir.actions.act_window + member.slot.reservation + tree,form + {'search_default_available':1} + +

+ Create Your First Member Slot Reservation +

+
+
+ + +
diff --git a/odoo_parking_management/views/parking_entry_views.xml b/odoo_parking_management/views/parking_entry_views.xml new file mode 100644 index 000000000..fd3a268d1 --- /dev/null +++ b/odoo_parking_management/views/parking_entry_views.xml @@ -0,0 +1,245 @@ + + + + + parking.entry.view.kanban + parking.entry + + + + + + + + + +
+
+ + +
+ Slot: + +
+ Vehicle: + +
+ Check In: + +
+ Check Out: + +
+
+
+
+
+
+
+
+
+ + + parking.entry.view.kanban.allocated + parking.entry + + + + + +
+
+ + +
+
+
+
+
+
+
+
+
+ + + parking.entry.view.kanban.non.allocated + parking.entry + + + + + +
+
+ + +
+
+
+
+
+
+
+
+
+ + + parking.entry.view.tree + parking.entry + + + + + + + + + + + + + + parking.entry.view.form + parking.entry + +
+
+
+ + + + +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+
+ + + All Parking Entry + ir.actions.act_window + parking.entry + kanban,tree,form + {'search_default_available':1} + +

+ View Your Parking Entries +

+
+
+ + + Public Parking Entry + ir.actions.act_window + parking.entry + kanban,tree,form + {'default_customer_type':'public'} + [('customer_type', '=', ('public'))] + +

+ Create Your First Public Parking Entry +

+
+
+ + + Private Parking Entry + ir.actions.act_window + parking.entry + kanban,tree,form + {'default_customer_type':'private'} + [('customer_type', '=', ('private'))] + +

+ Create Your First Private Parking Entry +

+
+
+ + + + + + + +
diff --git a/odoo_parking_management/views/slot_details_views.xml b/odoo_parking_management/views/slot_details_views.xml new file mode 100644 index 000000000..afd8fd450 --- /dev/null +++ b/odoo_parking_management/views/slot_details_views.xml @@ -0,0 +1,147 @@ + + + + + slot.details.view.kanban + slot.details + + + + + +
+
+ + +
+
+
+
+
+
+
+
+
+ + + slot.details.view.tree + slot.details + + + + + + + + + + + slot.details.view.form + slot.details + +
+ + + + + + + + + + + +
+ + + +
+
+
+
+ + + Slots + ir.actions.act_window + slot.details + tree,form + {'search_default_available':1} + +

+ Create Your First Slot +

+
+
+ + + All Slots + ir.actions.act_window + slot.details + kanban,form + {'search_default_available':1} + +

+ Display all the slots +

+
+
+ + + Allocated Slots + ir.actions.act_window + parking.entry + kanban,form + + [('state','=',('check_in'))] + +

+ First Allocated Parking Entry +

+
+
+ + + Non Allocated Slots + ir.actions.act_window + parking.entry + kanban,form + + [('state','=',('check_out'))] + +

+ First Non Allocated Parking Entry +

+
+
+ + + + + + +
diff --git a/odoo_parking_management/views/slot_type_views.xml b/odoo_parking_management/views/slot_type_views.xml new file mode 100644 index 000000000..cc0ab088f --- /dev/null +++ b/odoo_parking_management/views/slot_type_views.xml @@ -0,0 +1,62 @@ + + + + + slot.type.view.tree + slot.type + + + + + + + + + + slot_type.view.form + slot.type + +
+ +

+ +

+ + + + + + + + +
+
+ + + +
+
+
+
+ + + Slot Types + ir.actions.act_window + slot.type + tree,form + {'search_default_available':1} + +

+ Create Your First Slot Type +

+
+
+ + +
diff --git a/odoo_parking_management/views/vehicle_details_views.xml b/odoo_parking_management/views/vehicle_details_views.xml new file mode 100644 index 000000000..ba795c968 --- /dev/null +++ b/odoo_parking_management/views/vehicle_details_views.xml @@ -0,0 +1,64 @@ + + + + + vehicle.details.view.tree + vehicle.details + + + + + + + + + + + + + vehicle.details.view.form + vehicle.details + +
+ + + + + + + + + + + + + +
+ + + +
+
+
+
+ + + Vehicle + ir.actions.act_window + vehicle.details + tree,form + {'search_default_available':1} + +

+ Create Your First Vehicle Entry +

+
+
+ + +
diff --git a/odoo_parking_management/wizard/__init__.py b/odoo_parking_management/wizard/__init__.py new file mode 100644 index 000000000..7dbe1e0ae --- /dev/null +++ b/odoo_parking_management/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from . import register_payment diff --git a/odoo_parking_management/wizard/register_payment.py b/odoo_parking_management/wizard/register_payment.py new file mode 100644 index 000000000..37a346d44 --- /dev/null +++ b/odoo_parking_management/wizard/register_payment.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Vishnu KP () +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################ +from odoo import fields, models + + +class RegisterPaymentWizard(models.TransientModel): + """Details for a payment for parking""" + _name = 'register.payment.wizard' + _description = 'Register Parking Payment' + + partner_id = fields.Many2one('res.partner', + string='Partner', + help='Name of partner to register the payment') + parking_duration = fields.Float(string='Duration', + help='Duration of the parking vehicle') + amount = fields.Float(string='Amount', + help='Amount of the parking vehicle') + ref = fields.Char(string='Reference', + help='Reference to the parking ticket') + date = fields.Date(string='Date', default=fields.Date.context_today, + help='Date when payment was made') + + def parking_payment(self): + """Returns the amount of the parking ticket for the customer.""" + active_id = self._context.get('active_id') + active_record = self.env['parking.entry'].browse(active_id) + payment = self.env['account.payment'].create({ + 'payment_type': 'inbound', + 'partner_id': self.partner_id.id, + 'amount': self.amount, + 'ref': self.ref, + }) + payment.action_post() + active_record.paid_bool = True + active_record.state = 'payment' diff --git a/odoo_parking_management/wizard/register_payment_views.xml b/odoo_parking_management/wizard/register_payment_views.xml new file mode 100644 index 000000000..555fb9db4 --- /dev/null +++ b/odoo_parking_management/wizard/register_payment_views.xml @@ -0,0 +1,27 @@ + + + + + register.payment.wizard.view.form + register.payment.wizard + +
+ + + + + + + + + + + + +
+
+
+