@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
import models |
@ -0,0 +1,43 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'name': 'Fleet Rental Management', |
|||
'summary': """This module will helps you to give the vehicles for Rent.""", |
|||
'version': '10.0.1.0.0', |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'website': "http://www.cybrosys.com", |
|||
'company': 'Cybrosys Techno Solutions', |
|||
"category": "Industries", |
|||
'depends': ['account', 'fleet'], |
|||
'data': ['views/car_rental_view.xml', |
|||
'views/checklist_view.xml', |
|||
'views/car_tools_view.xml', |
|||
'data/fleet_rental_data.xml', |
|||
], |
|||
'demo': [ |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'application': False, |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<record model="product.template" id="fleet_service_product"> |
|||
<field name="name">Fleet Rental Service</field> |
|||
<field name="type">service</field> |
|||
</record> |
|||
<record id="vehicle_state_rent" model="fleet.vehicle.state"> |
|||
<field name="name">Rent</field> |
|||
<field name="sequence">3</field> |
|||
</record> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,23 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
import car_rental |
@ -0,0 +1,334 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
|||
# Author: Avinash Nk(<http://www.cybrosys.com>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
from datetime import datetime, date |
|||
from odoo import models, fields, api, _ |
|||
from odoo.exceptions import UserError |
|||
|
|||
|
|||
class CarRentalContract(models.Model): |
|||
_name = 'car.rental.contract' |
|||
|
|||
contract_name = fields.Char(string="Name", default="Draft Contract", readonly=True) |
|||
name = fields.Many2one('res.partner', required=True, help="Customer") |
|||
vehicle_id = fields.Many2one('fleet.vehicle', string="Vehicle To Rent", required=True) |
|||
car_brand = fields.Char(string="Car Brand", size=50) |
|||
car_color = fields.Char(string="Car Color", size=50) |
|||
cost = fields.Float(string="Rent Cost", help="This fields is to determine the cost of rent per hour", required=True) |
|||
rent_start_date = fields.Date(string="Rent Start Date", required=True, default=datetime.today()) |
|||
rent_end_date = fields.Date(string="Rent End Date", required=True) |
|||
state = fields.Selection([('draft', 'Draft'), ('running', 'Running'), ('cancel', 'Cancel'), |
|||
('checking', 'Checking'), ('done', 'Done')], string="State", default="draft") |
|||
notes = fields.Text(string="Details") |
|||
cost_generated = fields.Float('Recurring Cost', |
|||
help="Costs paid at regular intervals, depending on the cost frequency") |
|||
cost_frequency = fields.Selection([('no', 'No'), ('daily', 'Daily'), ('weekly', 'Weekly'), ('monthly', 'Monthly'), |
|||
('yearly', 'Yearly')], string="Recurring Cost Frequency", |
|||
help='Frequency of the recurring cost', required=True) |
|||
journal_type = fields.Many2one('account.journal', 'Journal', |
|||
default=lambda self: self.env['account.journal'].search([('id', '=', 1)])) |
|||
account_type = fields.Many2one('account.account', 'Account', |
|||
default=lambda self: self.env['account.account'].search([('id', '=', 17)])) |
|||
recurring_line = fields.One2many('fleet.rental.line', 'rental_number', readonly=True) |
|||
first_payment = fields.Float(string='First Payment') |
|||
first_invoice_created = fields.Boolean(string="First Invoice Created", invisible=True) |
|||
attachment_ids = fields.Many2many('ir.attachment', 'car_rent_checklist_ir_attachments_rel', |
|||
'rental_id', 'attachment_id', string="Attachments", |
|||
help="Images of the vehicle before contract/any attachments") |
|||
checklist_line = fields.One2many('car.rental.checklist', 'checklist_number', string="Checklist") |
|||
total = fields.Float(string="Total(Tools)", readonly=True) |
|||
tools_missing_cost = fields.Float(string="Tools missing cost", readonly=True) |
|||
damage_cost = fields.Float(string="Damage cost") |
|||
damage_cost_sub = fields.Float(string="Damage cost", readonly=True) |
|||
total_cost = fields.Float(string="Total cost", readonly=True) |
|||
|
|||
@api.constrains('state') |
|||
def state_changer(self): |
|||
if self.state == "running": |
|||
state_id = self.env['fleet.vehicle.state'].search([('name', '=', "Rent")]).id |
|||
self.vehicle_id.write({'state_id': state_id}) |
|||
elif self.state == "done": |
|||
state_id = self.env['fleet.vehicle.state'].search([('name', '=', "Active")]).id |
|||
self.vehicle_id.write({'state_id': state_id}) |
|||
|
|||
@api.constrains('checklist_line', 'damage_cost') |
|||
def total_updater(self): |
|||
total = 0.0 |
|||
tools_missing_cost = 0.0 |
|||
for records in self.checklist_line: |
|||
total += records.price |
|||
if not records.checklist_active: |
|||
tools_missing_cost += records.price |
|||
self.total = total |
|||
self.tools_missing_cost = tools_missing_cost |
|||
self.damage_cost_sub = self.damage_cost |
|||
self.total_cost = tools_missing_cost + self.damage_cost |
|||
|
|||
@api.model |
|||
def fleet_scheduler(self): |
|||
inv_obj = self.env['account.invoice'] |
|||
inv_line_obj = self.env['account.invoice.line'] |
|||
recurring_obj = self.env['fleet.rental.line'] |
|||
today = date.today() |
|||
for records in self.search([]): |
|||
start_date = datetime.strptime(records.rent_start_date, '%Y-%m-%d').date() |
|||
end_date = datetime.strptime(records.rent_end_date, '%Y-%m-%d').date() |
|||
if end_date >= date.today(): |
|||
temp = 0 |
|||
if records.cost_frequency == 'daily': |
|||
temp = 1 |
|||
elif records.cost_frequency == 'weekly': |
|||
week_days = (date.today() - start_date).days |
|||
if week_days % 7 == 0 and week_days != 0: |
|||
temp = 1 |
|||
elif records.cost_frequency == 'monthly': |
|||
if start_date.day == date.today().day and start_date != date.today(): |
|||
temp = 1 |
|||
elif records.cost_frequency == 'yearly': |
|||
if start_date.day == date.today().day and start_date.month == date.today().month and \ |
|||
start_date != date.today(): |
|||
temp = 1 |
|||
if temp == 1 and records.cost_frequency != "no" and records.state == "running": |
|||
supplier = records.name |
|||
inv_data = { |
|||
'name': supplier.name, |
|||
'reference': supplier.name, |
|||
'account_id': supplier.property_account_payable_id.id, |
|||
'partner_id': supplier.id, |
|||
'currency_id': records.account_type.company_id.currency_id.id, |
|||
'journal_id': records.journal_type.id, |
|||
'origin': records.vehicle_id.name, |
|||
'company_id': records.account_type.company_id.id, |
|||
'date_due': self.rent_end_date, |
|||
} |
|||
inv_id = inv_obj.create(inv_data) |
|||
product_id = self.env['product.product'].search([("name", "=", "Fleet Rental Service")]) |
|||
if product_id.property_account_income_id.id: |
|||
income_account = product_id.property_account_income_id |
|||
elif product_id.categ_id.property_account_income_categ_id.id: |
|||
income_account = product_id.categ_id.property_account_income_categ_id |
|||
else: |
|||
raise UserError( |
|||
_('Please define income account for this product: "%s" (id:%d).') % (product_id.name, |
|||
product_id.id)) |
|||
recurring_data = { |
|||
'name': records.vehicle_id.name, |
|||
'date_today': today, |
|||
'account_info': income_account.name, |
|||
'rental_number': records.id, |
|||
'recurring_amount': records.cost_generated, |
|||
'invoice_number': inv_id.id |
|||
} |
|||
recurring_obj.create(recurring_data) |
|||
inv_line_data = { |
|||
'name': records.vehicle_id.name, |
|||
'account_id': income_account.id, |
|||
'price_unit': records.cost_generated, |
|||
'quantity': 1, |
|||
'product_id': product_id.id, |
|||
'invoice_id': inv_id.id, |
|||
} |
|||
inv_line_obj.create(inv_line_data) |
|||
else: |
|||
records.state = "checking" |
|||
|
|||
@api.multi |
|||
def action_verify(self): |
|||
self.state = "done" |
|||
if self.total_cost != 0: |
|||
inv_obj = self.env['account.invoice'] |
|||
inv_line_obj = self.env['account.invoice.line'] |
|||
supplier = self.name |
|||
inv_data = { |
|||
'name': supplier.name, |
|||
'reference': supplier.name, |
|||
'account_id': supplier.property_account_payable_id.id, |
|||
'partner_id': supplier.id, |
|||
'currency_id': self.account_type.company_id.currency_id.id, |
|||
'journal_id': self.journal_type.id, |
|||
'origin': self.vehicle_id.name, |
|||
'company_id': self.account_type.company_id.id, |
|||
'date_due': self.rent_end_date, |
|||
} |
|||
inv_id = inv_obj.create(inv_data) |
|||
product_id = self.env['product.product'].search([("name", "=", "Fleet Rental Service")]) |
|||
if product_id.property_account_income_id.id: |
|||
income_account = product_id.property_account_income_id |
|||
elif product_id.categ_id.property_account_income_categ_id.id: |
|||
income_account = product_id.categ_id.property_account_income_categ_id |
|||
else: |
|||
raise UserError( |
|||
_('Please define income account for this product: "%s" (id:%d).') % (product_id.name, |
|||
product_id.id)) |
|||
inv_line_data = { |
|||
'name': "Damage/Tools missing cost", |
|||
'account_id': income_account.id, |
|||
'price_unit': self.total_cost, |
|||
'quantity': 1, |
|||
'product_id': product_id.id, |
|||
'invoice_id': inv_id.id, |
|||
} |
|||
inv_line_obj.create(inv_line_data) |
|||
imd = self.env['ir.model.data'] |
|||
action = imd.xmlid_to_object('account.action_invoice_tree1') |
|||
list_view_id = imd.xmlid_to_res_id('account.invoice_tree') |
|||
form_view_id = imd.xmlid_to_res_id('account.invoice_form') |
|||
result = { |
|||
'name': action.name, |
|||
'help': action.help, |
|||
'type': 'ir.actions.act_window', |
|||
'views': [[list_view_id, 'tree'], [form_view_id, 'form'], [False, 'graph'], [False, 'kanban'], |
|||
[False, 'calendar'], [False, 'pivot']], |
|||
'target': action.target, |
|||
'context': action.context, |
|||
'res_model': 'account.invoice', |
|||
} |
|||
if len(inv_id) > 1: |
|||
result['domain'] = "[('id','in',%s)]" % inv_id.ids |
|||
elif len(inv_id) == 1: |
|||
result['views'] = [(form_view_id, 'form')] |
|||
result['res_id'] = inv_id.ids[0] |
|||
else: |
|||
result = {'type': 'ir.actions.act_window_close'} |
|||
return result |
|||
|
|||
@api.multi |
|||
def action_confirm(self): |
|||
self.state = "running" |
|||
sequence_code = 'car.rental.sequence' |
|||
order_date = self.create_date |
|||
order_date = order_date[0:10] |
|||
self.contract_name = self.env['ir.sequence']\ |
|||
.with_context(ir_sequence_date=order_date).next_by_code(sequence_code) |
|||
|
|||
@api.multi |
|||
def action_cancel(self): |
|||
self.state = "cancel" |
|||
|
|||
@api.multi |
|||
def force_checking(self): |
|||
self.state = "checking" |
|||
|
|||
@api.multi |
|||
def action_invoice_create(self): |
|||
self.first_invoice_created = True |
|||
inv_obj = self.env['account.invoice'] |
|||
inv_line_obj = self.env['account.invoice.line'] |
|||
supplier = self.name |
|||
inv_data = { |
|||
'name': supplier.name, |
|||
'reference': supplier.name, |
|||
'account_id': supplier.property_account_payable_id.id, |
|||
'partner_id': supplier.id, |
|||
'currency_id': self.account_type.company_id.currency_id.id, |
|||
'journal_id': self.journal_type.id, |
|||
'origin': self.vehicle_id.name, |
|||
'company_id': self.account_type.company_id.id, |
|||
'date_due': self.rent_end_date, |
|||
} |
|||
inv_id = inv_obj.create(inv_data) |
|||
product_id = self.env['product.product'].search([("name", "=", "Fleet Rental Service")]) |
|||
if product_id.property_account_income_id.id: |
|||
income_account = product_id.property_account_income_id.id |
|||
elif product_id.categ_id.property_account_income_categ_id.id: |
|||
income_account = product_id.categ_id.property_account_income_categ_id.id |
|||
else: |
|||
raise UserError( |
|||
_('Please define income account for this product: "%s" (id:%d).') % (product_id.name, |
|||
product_id.id)) |
|||
inv_line_data = { |
|||
'name': self.vehicle_id.name, |
|||
'account_id': income_account, |
|||
'price_unit': self.first_payment, |
|||
'quantity': 1, |
|||
'product_id': product_id.id, |
|||
'invoice_id': inv_id.id, |
|||
} |
|||
inv_line_obj.create(inv_line_data) |
|||
imd = self.env['ir.model.data'] |
|||
action = imd.xmlid_to_object('account.action_invoice_tree1') |
|||
list_view_id = imd.xmlid_to_res_id('account.invoice_tree') |
|||
form_view_id = imd.xmlid_to_res_id('account.invoice_form') |
|||
result = { |
|||
'name': action.name, |
|||
'help': action.help, |
|||
'type': 'ir.actions.act_window', |
|||
'views': [[list_view_id, 'tree'], [form_view_id, 'form'], [False, 'graph'], [False, 'kanban'], |
|||
[False, 'calendar'], [False, 'pivot']], |
|||
'target': action.target, |
|||
'context': action.context, |
|||
'res_model': 'account.invoice', |
|||
} |
|||
if len(inv_id) > 1: |
|||
result['domain'] = "[('id','in',%s)]" % inv_id.ids |
|||
elif len(inv_id) == 1: |
|||
result['views'] = [(form_view_id, 'form')] |
|||
result['res_id'] = inv_id.ids[0] |
|||
else: |
|||
result = {'type': 'ir.actions.act_window_close'} |
|||
return result |
|||
|
|||
@api.onchange('vehicle_id') |
|||
def update_fields(self): |
|||
if self.vehicle_id: |
|||
obj = self.env['fleet.vehicle'].search([('name', '=', self.vehicle_id.name)]) |
|||
self.car_brand = obj.model_id.brand_id.name |
|||
self.car_color = obj.color |
|||
|
|||
|
|||
class FleetRentalLine(models.Model): |
|||
_name = 'fleet.rental.line' |
|||
|
|||
name = fields.Char('Description') |
|||
date_today = fields.Date('Date') |
|||
account_info = fields.Char('Account') |
|||
recurring_amount = fields.Float('Amount') |
|||
rental_number = fields.Integer('Rental Number') |
|||
payment_info = fields.Char(string='Payment Stage', compute='paid_info') |
|||
invoice_number = fields.Integer(string='Invoice ID') |
|||
|
|||
@api.one |
|||
def paid_info(self): |
|||
if self.env['account.invoice'].browse(self.invoice_number): |
|||
self.payment_info = self.env['account.invoice'].browse(self.invoice_number).state |
|||
else: |
|||
self.payment_info = 'Record Deleted' |
|||
|
|||
|
|||
class CarRentalChecklist(models.Model): |
|||
_name = 'car.rental.checklist' |
|||
|
|||
name = fields.Many2one('car.tools', string="Name") |
|||
checklist_active = fields.Boolean(string="Active", default=True) |
|||
checklist_number = fields.Many2one('car.rental.contract', string="Checklist number") |
|||
price = fields.Float(string="Price") |
|||
|
|||
@api.onchange('name') |
|||
def onchange_name(self): |
|||
self.price = self.name.price |
|||
|
|||
|
|||
class CarTools(models.Model): |
|||
_name = 'car.tools' |
|||
|
|||
name = fields.Char(string="Name") |
|||
price = fields.Float(string="Price") |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 9.2 KiB |
@ -0,0 +1,138 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_spaced"> |
|||
<h2 class="oe_slogan">Fleet Rental Management</h2> |
|||
<h3 class="oe_slogan">This Module Helps You To Give The Vehicles For Rent.</h3> |
|||
<h4 class="oe_slogan" style="font-size: 23px;">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
|||
</div> |
|||
<div class="oe_spaced" style="padding-left:65px;"> |
|||
<h4>Features:</h4> |
|||
<div> |
|||
<span style="color:green;"> ☑ </span> Integrated with Accounting Module.<br/> |
|||
<span style="color:green;"> ☑ </span> Automatically Create Recurring Invoices.<br/> |
|||
<span style="color:green;"> ☑ </span> Check list Facility.<br/> |
|||
<span style="color:green;"> ☑ </span> Separate Tree view for Checklist.<br/> |
|||
<span style="color:green;"> ☑ </span> Damage Checking Facility.<br/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_spaced"> |
|||
<div class="oe_picture"> |
|||
<h3 class="oe_slogan">Overview</h3> |
|||
<p class="oe_mt32"> |
|||
This module is an extension to the fleet module which helps |
|||
with an opportunity to rent your car. Currently fleet module |
|||
does not have connection with accounting module. But in this |
|||
module, we integrate the module with accounting. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<div class="oe_spaced"> |
|||
<h3 class="oe_slogan">Menu</h3> |
|||
<div class="" style="text-align: center"> |
|||
<p> |
|||
<h4>Fleet -> Rental Management</h4> |
|||
<p> |
|||
</div> |
|||
<div class="" style="text-align: center"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img style="border:10px solid white;height: 400px;" src="menu_items.png"> |
|||
</div> |
|||
<span>☛ When you install the module, an extra menu |
|||
Rental Management created under Fleet Menu.</span> |
|||
</div> |
|||
<br> |
|||
<div class="" style="text-align: center"> |
|||
<div class="" style="text-align: center"> |
|||
<p> |
|||
<h4>Fleet -> Rental Management -> Rental Contract</h4> |
|||
<p> |
|||
</div> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img style="border:10px solid white;" src="contract_menu.png"> |
|||
</div> |
|||
<span>☛ This is the Rental Contract form. you can see the Recurring |
|||
lines created according to the Recurring cost</span> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_spaced"> |
|||
<h3 class="oe_slogan">Checklist</h3> |
|||
<div class="" style="text-align: center"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img style="border:10px solid white;height: 400px;" src="checklist_contract.png"> |
|||
</div> |
|||
<span>☛ Checklist Tab in Rental Contract Form.</span> |
|||
</div> |
|||
<br> |
|||
<div class="" style="text-align: center"> |
|||
<div class="" style="text-align: center"> |
|||
<p> |
|||
Here you can add the list of tools given with the vehicle. |
|||
When the vehicle is returned back, the checklist can be validated |
|||
and helps you to identify the tools that are not returned. |
|||
The price of unreturned tools will be added to the missing tool cost. |
|||
The renter have to pay that amount and you can also add damage cost if any. |
|||
Check the damages by using the images of vehicle uploaded before the contract. |
|||
<p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_spaced"> |
|||
<h3 class="oe_slogan">Checklist Easy Access</h3> |
|||
<div class="" style="text-align: center"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img style="border:10px solid white;" src="check_list_tree.png"> |
|||
</div> |
|||
<span>☛ No need to open all rental contract to see the checklist.</span> |
|||
</div> |
|||
<div class="" style="text-align: center"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img style="border:10px solid white;" src="check_list_form.png"> |
|||
</div> |
|||
<span>☛ |
|||
You can also create invoice against the checklist from here. |
|||
The checklists are those which are in the checking state, |
|||
that means the ones ready for checking the operation. |
|||
If there is any damage or any missing tool, then you can |
|||
charge that from customer.</span> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="http://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
|
|||
|
After Width: | Height: | Size: 50 KiB |
@ -0,0 +1,170 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<record id="sequence_car_rental" model="ir.sequence"> |
|||
<field name="name">Car Rental Sequence</field> |
|||
<field name="code">car.rental.sequence</field> |
|||
<field name="prefix">RENT/%(range_year)s/</field> |
|||
<field eval="1" name="number_next"/> |
|||
<field eval="1" name="number_increment"/> |
|||
<field eval="True" name="use_date_range"/> |
|||
<field name="padding">4</field> |
|||
</record> |
|||
</data> |
|||
<data> |
|||
<record id="cron_scheduler_for_fleet" model="ir.cron"> |
|||
<field name="name">Fleet scheduler</field> |
|||
<field name="user_id" ref="base.user_root"/> |
|||
<field name="interval_number">1</field> |
|||
<field name="interval_type">days</field> |
|||
<field name="numbercall">-1</field> |
|||
<field eval="False" name="doall"/> |
|||
<field eval="'car.rental.contract'" name="model"/> |
|||
<field eval="'fleet_scheduler'" name="function"/> |
|||
</record> |
|||
<record id="car_rental_contract_form_view" model="ir.ui.view"> |
|||
<field name="name">car.contract.result.form</field> |
|||
<field name="model">car.rental.contract</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="car_result"> |
|||
<header> |
|||
<button name="action_confirm" string="Confirm" type="object" |
|||
attrs="{'invisible': [('state', '!=', 'draft')]}" class="oe_highlight"/> |
|||
<button name="action_cancel" string="Cancel" type="object" |
|||
attrs="{'invisible': [('state', '!=', 'draft')]}" class="oe_highlight"/> |
|||
<button name="action_invoice_create" string="Create Invoice" |
|||
attrs="{'invisible': ['|',('state', '!=', 'running'), |
|||
('first_invoice_created','=',True)]}" type="object" class="oe_highlight"/> |
|||
<button name="force_checking" string="Force Checking" |
|||
attrs="{'invisible': ['|',('state','!=','running'), |
|||
('first_invoice_created','=',False)]}" type="object" class="oe_highlight"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="draft,running"/> |
|||
</header> |
|||
<sheet> |
|||
<h1> |
|||
<field name="contract_name"/> |
|||
</h1> |
|||
<group> |
|||
<separator string="Contract Details " colspan="4" /> |
|||
<group> |
|||
<field name="name" string="Renter"/> |
|||
<field name="vehicle_id" domain="[('state_id', '!=', 'Rent')]"/> |
|||
<label for="cost_generated"/> |
|||
<div> |
|||
<field name="cost_frequency" class="oe_inline"/> |
|||
<field name="cost_generated" style="width:142px;" |
|||
attrs="{'invisible': [('cost_frequency','=','no')]}"/> |
|||
|
|||
</div> |
|||
<field name="journal_type" invisible="1" /> |
|||
</group> |
|||
<group> |
|||
<field name="car_brand"/> |
|||
<field name="car_color"/> |
|||
<field name="first_invoice_created" invisible="1"/> |
|||
<field name="first_payment"/> |
|||
<field name="account_type" invisible="1"/> |
|||
</group> |
|||
</group> |
|||
<group> |
|||
<separator string="Rental Information"/> |
|||
<group colspan="2"> |
|||
<group> |
|||
<field name="rent_start_date"/> |
|||
</group> |
|||
<group> |
|||
<field name="rent_end_date"/> |
|||
<field name="cost" invisible="1"/> |
|||
</group> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Recurring Lines"> |
|||
<field name="recurring_line" mode="tree"> |
|||
<tree string="Fleet Reccurring Lines" |
|||
colors="#0b7a35:payment_info=='paid';#f20b07:payment_info!='paid'"> |
|||
<field name="date_today"/> |
|||
<field name="name"/> |
|||
<field name="account_info"/> |
|||
<field name="recurring_amount"/> |
|||
<field name="payment_info"/> |
|||
</tree> |
|||
</field> |
|||
</page> |
|||
<page string="Checklist"> |
|||
<group> |
|||
<group> |
|||
<field name="attachment_ids" widget="many2many_binary" class="oe_inline"/> |
|||
</group> |
|||
<group> |
|||
<field name="damage_cost" attrs="{'invisible': [('state','!=','checking')]}"/> |
|||
</group> |
|||
</group> |
|||
<field name="checklist_line"> |
|||
<tree string="Fleet Checklist Lines" editable="bottom"> |
|||
<field name="name"/> |
|||
<field name="checklist_active"/> |
|||
<field name="price"/> |
|||
</tree> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<field name="name"/> |
|||
<field name="checklist_active" invisible="1"/> |
|||
<field name="checklist_number" invisible="1"/> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
<div> |
|||
<group class="oe_subtotal_footer oe_right"> |
|||
<field name="total"/> |
|||
<field name="tools_missing_cost"/> |
|||
<field name="damage_cost_sub"/> |
|||
<field name="total_cost" class="oe_subtotal_footer_separator"/> |
|||
</group> |
|||
</div> |
|||
<div style="float: right;margin-left: 78%;margin-bottom: 36px;"> |
|||
<button name="action_verify" string="Verify" type="object" |
|||
style="width: 100px !important;height: 40px;" |
|||
attrs="{'invisible': [('state', '!=', 'checking')]}" |
|||
class="oe_subtotal_footer oe_right oe_highlight"/> |
|||
</div> |
|||
</page> |
|||
</notebook> |
|||
<group> |
|||
<field name="notes"/> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record model="ir.ui.view" id="car_contract_tree_view"> |
|||
<field name="name">car_contract_tree_view.tree</field> |
|||
<field name="model">car.rental.contract</field> |
|||
<field name="type">tree</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="car_contract_result"> |
|||
<field name="name" string="Renter"/> |
|||
<field name="vehicle_id"/> |
|||
<field name="cost"/> |
|||
<field name="car_brand" /> |
|||
<field name="car_color" /> |
|||
<field name="rent_start_date"/> |
|||
<field name="rent_end_date"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="action_car_rental_contract" model="ir.actions.act_window"> |
|||
<field name="name">Rental Contract</field> |
|||
<field name="res_model">car.rental.contract</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
<menuitem id="menu_car_parent" sequence="1" name="Rental Management" parent="fleet.menu_root"/> |
|||
<menuitem id="menu_car_rental_contract" parent="menu_car_parent" name="Rental Contract" |
|||
action="action_car_rental_contract" sequence="1"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,43 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<record id="car_rental_contract_tools_form_view" model="ir.ui.view"> |
|||
<field name="name">car_rental_contract_tools_form_view.form</field> |
|||
<field name="model">car.tools</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="car_tools_form"> |
|||
<sheet> |
|||
<group> |
|||
<group> |
|||
<field name="name"/> |
|||
</group> |
|||
<group> |
|||
<field name="price"/> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="car_rental_contract_tools_tree_view" model="ir.ui.view"> |
|||
<field name="name">car_rental_contract_tools_tree_view.tree</field> |
|||
<field name="model">car.tools</field> |
|||
<field name="type">tree</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="car_tools_tree"> |
|||
<field name="name"/> |
|||
<field name="price"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="action_fleet_car_tools" model="ir.actions.act_window"> |
|||
<field name="name">Tools</field> |
|||
<field name="res_model">car.tools</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
<menuitem id="menu_car_tools" parent="menu_car_parent" name="Tools" |
|||
action="action_fleet_car_tools" sequence="3"/> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,84 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<odoo> |
|||
<data> |
|||
<record id="car_rental_contract_checklist_form_view" model="ir.ui.view"> |
|||
<field name="name">car_rental_contract_checklist_form_view.form</field> |
|||
<field name="model">car.rental.contract</field> |
|||
<field name="type">form</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="car_checklist2" create="false"> |
|||
<header> |
|||
<button name="action_verify" string="Create invoice" type="object" |
|||
attrs="{'invisible': [('state', '!=', 'checking')]}" class="oe_highlight"/> |
|||
<field name="state" widget="statusbar" statusbar_visible="checking"/> |
|||
</header> |
|||
<sheet> |
|||
<group> |
|||
<group> |
|||
<field name="contract_name" string="Contract" readonly="1"/> |
|||
<field name="attachment_ids" widget="many2many_binary" class="oe_inline" readonly="1"/> |
|||
</group> |
|||
<group> |
|||
<field name="damage_cost" readonly="1"/> |
|||
</group> |
|||
</group> |
|||
<notebook> |
|||
<page string="Checklist"> |
|||
<field name="checklist_line"> |
|||
<tree string="Fleet Checklist Lines" create="false" editable="bottom"> |
|||
<field name="name"/> |
|||
<field name="checklist_active"/> |
|||
<field name="price"/> |
|||
</tree> |
|||
</field> |
|||
<div> |
|||
<group class="oe_subtotal_footer oe_right"> |
|||
<field name="total"/> |
|||
<field name="tools_missing_cost"/> |
|||
<field name="damage_cost_sub"/> |
|||
<field name="total_cost" class="oe_subtotal_footer_separator"/> |
|||
</group> |
|||
</div> |
|||
</page> |
|||
</notebook> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
<record id="car_rental_contract_checklist_tree_view" model="ir.ui.view"> |
|||
<field name="name">car_rental_contract_checklist_tree_view.tree</field> |
|||
<field name="model">car.rental.contract</field> |
|||
<field name="type">tree</field> |
|||
<field name="arch" type="xml"> |
|||
<tree string="car_contract_result2" create="false" colors="#f20b07:state=='checking'"> |
|||
<field name="contract_name" string="Contract"/> |
|||
<field name="name" string="Renter"/> |
|||
<field name="state"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
<record id="action_fleet_rent_checklist" model="ir.actions.act_window"> |
|||
<field name="name">Checklist</field> |
|||
<field name="res_model">car.rental.contract</field> |
|||
<field name="view_type">form</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="view_id" ref="car_rental_contract_checklist_form_view"/> |
|||
</record> |
|||
|
|||
<record id="action_fleet_rent_checklist_form" model="ir.actions.act_window.view"> |
|||
<field eval="2" name="sequence"/> |
|||
<field name="view_mode">form</field> |
|||
<field name="view_id" ref="car_rental_contract_checklist_form_view"/> |
|||
<field name="act_window_id" ref="action_fleet_rent_checklist"/> |
|||
</record> |
|||
|
|||
<record id="action_fleet_rent_checklist_tree" model="ir.actions.act_window.view"> |
|||
<field eval="1" name="sequence"/> |
|||
<field name="view_mode">tree</field> |
|||
<field name="view_id" ref="car_rental_contract_checklist_tree_view"/> |
|||
<field name="act_window_id" ref="action_fleet_rent_checklist"/> |
|||
</record> |
|||
<menuitem id="menu_car_checklist" parent="menu_car_parent" name="Checklist" |
|||
action="action_fleet_rent_checklist" sequence="2"/> |
|||
</data> |
|||
</odoo> |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 146 KiB |