@ -0,0 +1,44 @@ |
|||||
|
.. 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 <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developers: (V18) Fathima Mazlin AM, |
||||
|
(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 <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import models |
||||
|
from . import wizard |
@ -0,0 +1,54 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Parking Management', |
||||
|
'version': '18.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', 'project'], |
||||
|
'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, |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<data noupdate="1"> |
||||
|
<!--Sequence for vehicle parked by public--> |
||||
|
<record id="seq_pubic_parking_entry" model="ir.sequence"> |
||||
|
<field name="name">Public Parking Entry</field> |
||||
|
<field name="code">public.parking.entry</field> |
||||
|
<field name="prefix">PUBLIC/PARKING/</field> |
||||
|
<field name="padding">5</field> |
||||
|
<field name="company_id" eval="False"/> |
||||
|
</record> |
||||
|
<!--Sequence for vehicle parked by members--> |
||||
|
<record id="seq_private_parking_entry" model="ir.sequence"> |
||||
|
<field name="name">Private Parking Entry</field> |
||||
|
<field name="code">private.parking.entry</field> |
||||
|
<field name="prefix">MEMBER/PARKING/</field> |
||||
|
<field name="padding">5</field> |
||||
|
<field name="company_id" eval="False"/> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,19 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!--Paper format for parking ticket--> |
||||
|
<record id="paper_format_parking_ticket" model="report.paperformat"> |
||||
|
<field name="name">Gate Pass</field> |
||||
|
<field name="default" eval="True"/> |
||||
|
<field name="format">custom</field> |
||||
|
<field name="page_height">120</field> |
||||
|
<field name="page_width">70</field> |
||||
|
<field name="orientation">Portrait</field> |
||||
|
<field name="margin_top">40</field> |
||||
|
<field name="margin_bottom">10</field> |
||||
|
<field name="margin_left">5</field> |
||||
|
<field name="margin_right">5</field> |
||||
|
<field name="header_line" eval="False"/> |
||||
|
<field name="header_spacing">40</field> |
||||
|
<field name="dpi">90</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,6 @@ |
|||||
|
## Module <odoo_parking_management> |
||||
|
|
||||
|
#### 24.04.2025 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial commit for Parking Management |
@ -0,0 +1,27 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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 |
@ -0,0 +1,31 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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') |
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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') |
@ -0,0 +1,174 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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 |
||||
|
total_minutes = dur_dif.total_seconds() // 60 |
||||
|
hours = total_minutes // 60 |
||||
|
minutes = total_minutes % 60 |
||||
|
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', |
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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') |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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') |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# 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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
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') |
@ -0,0 +1,73 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<odoo> |
||||
|
<!--Template of parking ticket--> |
||||
|
<template id="parking_ticket"> |
||||
|
<t t-call="web.html_container"> |
||||
|
<t t-foreach="docs" t-as="doc"> |
||||
|
<t t-call="web.external_layout"> |
||||
|
<div class="page"> |
||||
|
<br/> |
||||
|
<br/> |
||||
|
<br/> |
||||
|
<strong> |
||||
|
<h2>Parking Ticket</h2> |
||||
|
</strong> |
||||
|
<table class="table table-borderless" |
||||
|
style="border: 2px solid black; border-collapse: collapse; width: 30%;"> |
||||
|
<tr> |
||||
|
<td style="padding:1px;border-left: solid;"> |
||||
|
REFERENCE</td> |
||||
|
<td style="padding:1px;border-bottom;">:</td> |
||||
|
<td style="padding:2px;border-right: solid;"> |
||||
|
<t t-esc="doc.name"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="padding:1px;border-left: solid;">Vehicle Number</td> |
||||
|
<td style="padding:1px;border-bottom;">:</td> |
||||
|
<td style="padding:2px;border-right: solid;"> |
||||
|
<t t-esc="doc.vehicle_id.number_plate"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="padding:1px;border-left: solid;">Location</td> |
||||
|
<td style="padding:1px;border-bottom;">:</td> |
||||
|
<td style="padding:2px;border-right: solid;"> |
||||
|
<t t-esc="doc.location_id.name"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="padding:1px;border-left: solid;">Check In</td> |
||||
|
<td style="padding:1px;border-bottom;">:</td> |
||||
|
<td style="padding:2px;border-right: solid;"> |
||||
|
<t t-esc="doc.check_in"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
<tr> |
||||
|
<td style="padding:1px;border-left: solid;">Check Out</td> |
||||
|
<td style="padding:1px;border-bottom;">:</td> |
||||
|
<td style="padding:2px;border-right: solid;"> |
||||
|
<t t-esc="doc.check_out"/> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</table> |
||||
|
<br> |
||||
|
</br> |
||||
|
</div> |
||||
|
</t> |
||||
|
</t> |
||||
|
</t> |
||||
|
</template> |
||||
|
<!-- Parking entry report action--> |
||||
|
<record id="report_parking_ticket" model="ir.actions.report"> |
||||
|
<field name="name">Parking Ticket Report</field> |
||||
|
<field name="model">parking.entry</field> |
||||
|
<field name="report_type">qweb-pdf</field> |
||||
|
<field name="report_name">odoo_parking_management.parking_ticket</field> |
||||
|
<field name="report_file">odoo_parking_management.parking_ticket</field> |
||||
|
<field name="paperformat_id" |
||||
|
ref="odoo_parking_management.paper_format_parking_ticket"/> |
||||
|
<field name="binding_type">report</field> |
||||
|
<field name="binding_model_id" ref="model_parking_entry"/> |
||||
|
</record> |
||||
|
</odoo> |
|
@ -0,0 +1,21 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<odoo> |
||||
|
<!-- Parking management category record--> |
||||
|
<record model="ir.module.category" id="module_odoo_parking_management"> |
||||
|
<field name="name">Parking Management</field> |
||||
|
<field name="description">Category for Parking Management</field> |
||||
|
</record> |
||||
|
<!--Group For User--> |
||||
|
<record id="odoo_parking_management_group_parking_user" model="res.groups"> |
||||
|
<field name="name">User</field> |
||||
|
<field name="category_id" ref="module_odoo_parking_management"/> |
||||
|
</record> |
||||
|
<!--Group For Manager--> |
||||
|
<record id="odoo_parking_management_group_parking_manager" |
||||
|
model="res.groups"> |
||||
|
<field name="name">Manager</field> |
||||
|
<field name="category_id" ref="module_odoo_parking_management"/> |
||||
|
<field name="implied_ids" |
||||
|
eval="[(4, ref('odoo_parking_management_group_parking_user'))]"/> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<odoo> |
||||
|
<!--XML for viewing created records of logged user--> |
||||
|
<record id="parking_entry_rule_parking_user" model="ir.rule"> |
||||
|
<field name="name">View Own Docs</field> |
||||
|
<field ref="model_parking_entry" name="model_id"/> |
||||
|
<field name="domain_force">['|',('user_id', '=', user.id),('create_uid','=', user.id)] |
||||
|
</field> |
||||
|
<field name="groups" |
||||
|
eval="[(4, ref('odoo_parking_management.odoo_parking_management_group_parking_user'))]"/> |
||||
|
</record> |
||||
|
<!--XML for viewing all the records of all the users--> |
||||
|
<record id="parking_entry_rule_manager" model="ir.rule"> |
||||
|
<field name="name">View All Docs</field> |
||||
|
<field ref="model_parking_entry" name="model_id"/> |
||||
|
<field name="domain_force">[(1, '=', 1)]</field> |
||||
|
<field name="groups" |
||||
|
eval="[(4, ref('odoo_parking_management.odoo_parking_management_group_parking_manager'))]"/> |
||||
|
</record> |
||||
|
</odoo> |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 912 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 86 KiB |