diff --git a/odoo_parking_management/README.rst b/odoo_parking_management/README.rst new file mode 100644 index 000000000..5d513d224 --- /dev/null +++ b/odoo_parking_management/README.rst @@ -0,0 +1,40 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.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. + +Company +------- +* 'Cybrosys Techno Solutions '__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: (V15) Nihala KP, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com + + +Further information +=================== +HTML Description: ``__ diff --git a/odoo_parking_management/__init__.py b/odoo_parking_management/__init__.py new file mode 100644 index 000000000..eccbc64ad --- /dev/null +++ b/odoo_parking_management/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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..6f8876a64 --- /dev/null +++ b/odoo_parking_management/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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': '15.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 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': False, +} 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..275b4e262 --- /dev/null +++ b/odoo_parking_management/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module <>odoo_parking_management + +#### 24.04.2024 +#### Version 15.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..59d9700a0 --- /dev/null +++ b/odoo_parking_management/models/__init__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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 location_details +from . import member_slot_reservation +from . import parking_entry +from . import slot_details +from . import slot_type +from . import vehicle_details diff --git a/odoo_parking_management/models/location_details.py b/odoo_parking_management/models/location_details.py new file mode 100644 index 000000000..817c07a4e --- /dev/null +++ b/odoo_parking_management/models/location_details.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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 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..466b3845e --- /dev/null +++ b/odoo_parking_management/models/member_slot_reservation.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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 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..897927f5f --- /dev/null +++ b/odoo_parking_management/models/parking_entry.py @@ -0,0 +1,177 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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..3e0d35b99 --- /dev/null +++ b/odoo_parking_management/models/slot_details.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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..6e09c0e42 --- /dev/null +++ b/odoo_parking_management/models/slot_type.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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..c3c181481 --- /dev/null +++ b/odoo_parking_management/models/vehicle_details.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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/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/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/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/categories.png b/odoo_parking_management/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/categories.png differ diff --git a/odoo_parking_management/static/description/assets/misc/check-box.png b/odoo_parking_management/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/check-box.png differ diff --git a/odoo_parking_management/static/description/assets/misc/compass.png b/odoo_parking_management/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/compass.png differ diff --git a/odoo_parking_management/static/description/assets/misc/corporate.png b/odoo_parking_management/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/corporate.png differ diff --git a/odoo_parking_management/static/description/assets/misc/customer-support.png b/odoo_parking_management/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/customer-support.png differ diff --git a/odoo_parking_management/static/description/assets/misc/cybrosys-logo.png b/odoo_parking_management/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/cybrosys-logo.png differ diff --git a/odoo_parking_management/static/description/assets/misc/features.png b/odoo_parking_management/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/features.png differ diff --git a/odoo_parking_management/static/description/assets/misc/logo.png b/odoo_parking_management/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/logo.png differ diff --git a/odoo_parking_management/static/description/assets/misc/pictures.png b/odoo_parking_management/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/pictures.png differ diff --git a/odoo_parking_management/static/description/assets/misc/pie-chart.png b/odoo_parking_management/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/pie-chart.png differ diff --git a/odoo_parking_management/static/description/assets/misc/right-arrow.png b/odoo_parking_management/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/right-arrow.png differ diff --git a/odoo_parking_management/static/description/assets/misc/star.png b/odoo_parking_management/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/star.png differ diff --git a/odoo_parking_management/static/description/assets/misc/support.png b/odoo_parking_management/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/support.png differ diff --git a/odoo_parking_management/static/description/assets/misc/whatsapp.png b/odoo_parking_management/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/odoo_parking_management/static/description/assets/misc/whatsapp.png differ diff --git a/odoo_parking_management/static/description/assets/modules/auto_database_backup.gif b/odoo_parking_management/static/description/assets/modules/auto_database_backup.gif new file mode 100644 index 000000000..591c8b18d Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/auto_database_backup.gif differ diff --git a/odoo_parking_management/static/description/assets/modules/hide_menu_user.png b/odoo_parking_management/static/description/assets/modules/hide_menu_user.png new file mode 100644 index 000000000..6bc155887 Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/hide_menu_user.png differ diff --git a/odoo_parking_management/static/description/assets/modules/multi_branch_base.png b/odoo_parking_management/static/description/assets/modules/multi_branch_base.png new file mode 100644 index 000000000..6f654cfdb Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/multi_branch_base.png differ diff --git a/odoo_parking_management/static/description/assets/modules/odoo_dynamic_dashboard.png b/odoo_parking_management/static/description/assets/modules/odoo_dynamic_dashboard.png new file mode 100644 index 000000000..3599974eb Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/odoo_dynamic_dashboard.png differ diff --git a/odoo_parking_management/static/description/assets/modules/odoo_website_helpdesk.png b/odoo_parking_management/static/description/assets/modules/odoo_website_helpdesk.png new file mode 100644 index 000000000..f19f3578e Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/odoo_website_helpdesk.png differ diff --git a/odoo_parking_management/static/description/assets/modules/web_login_styles.png b/odoo_parking_management/static/description/assets/modules/web_login_styles.png new file mode 100644 index 000000000..e20126a45 Binary files /dev/null and b/odoo_parking_management/static/description/assets/modules/web_login_styles.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/1.png b/odoo_parking_management/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..4640b1c4c Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/1.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/10.png b/odoo_parking_management/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..9aaf26b73 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/10.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/11.png b/odoo_parking_management/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..f9ba8a2fb Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/11.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/12.png b/odoo_parking_management/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..c229d7e0c Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/12.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/2.png b/odoo_parking_management/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..ad33bebdc Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/2.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/3.png b/odoo_parking_management/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..d59238dd0 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/3.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/4.png b/odoo_parking_management/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..2fd8768e1 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/4.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/5.png b/odoo_parking_management/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..6577f01a5 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/5.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/6.png b/odoo_parking_management/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..d7b642b53 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/6.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/7.png b/odoo_parking_management/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..810947921 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/7.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/8.png b/odoo_parking_management/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..39b615040 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/8.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/9.png b/odoo_parking_management/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..59e7ea3a7 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/9.png differ diff --git a/odoo_parking_management/static/description/assets/screenshots/v15-hero.gif b/odoo_parking_management/static/description/assets/screenshots/v15-hero.gif new file mode 100644 index 000000000..7c8a3ea47 Binary files /dev/null and b/odoo_parking_management/static/description/assets/screenshots/v15-hero.gif 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..6cf5c8072 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..d106430f5 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..2ca77c11f --- /dev/null +++ b/odoo_parking_management/static/description/index.html @@ -0,0 +1,687 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Odoo parking Management

+

+ A Perfect Vehicle Parking Management +

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ Our perfect vehicle parking management system offers user and manager + level access, ensuring efficient control and oversight. With two types + of parking sections, detailed parking reports, and real-time slot + availability status, it streamlines operations for both administrators + and users, enhancing convenience and maximizing parking utilization. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + User and Manager Level Access. +
+
+ + + Two Type of Parking Section. +
+
+ + + Displays Report Based on the all Parking Entries. + +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+ +
+

+ + Choose the Access Level For the Module +

+ +
+ +
+

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

+ +
+ +
+

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

+ +
+ +
+

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

+ +
+ +
+

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

+ +
+
+

+ User can Download the Parking Ticket. +

+ + +
+
+

+ PDF reports +

+ +
+
+

+ Kanban View +

+ +
+
+

+ Slots Menu +

+ +
+
+

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

+
+

+ User can Set up The Reporting Tab. + +

+
+
+ + + +
+
+ +
+

+ 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

+
+
+
+
+
+
+
+ +
+
+
+ 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..0f4b4ab4e --- /dev/null +++ b/odoo_parking_management/views/parking_entry_views.xml @@ -0,0 +1,246 @@ + + + + + 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..5f81a3390 --- /dev/null +++ b/odoo_parking_management/wizard/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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..29bf0c252 --- /dev/null +++ b/odoo_parking_management/wizard/register_payment.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Nihala 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 action_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..b8e041287 --- /dev/null +++ b/odoo_parking_management/wizard/register_payment_views.xml @@ -0,0 +1,27 @@ + + + + + register.payment.wizard.view.form + register.payment.wizard + +
+ + + + + + + + + + + + +
+
+
+