Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD]car_rental: car rental #36

Open
wants to merge 46 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b30528d
[ADD] car_rental: Industry Car Rental
dhrs-odoo Oct 29, 2023
07c7284
[ADD] car_rental: add suggested changes
dhrs-odoo Nov 22, 2023
5e60a11
[ADD] car_rental: Fixup
dhrs-odoo Dec 1, 2023
6bb3cb4
[ADD] car_rental: removed the module name from records and refs
dhrs-odoo Dec 1, 2023
6b95cc9
[ADD] car_rental: improve the xpath
dhrs-odoo Dec 4, 2023
1f8f410
[ADD] car_rental: remove unnecessary dependency and fields
dhrs-odoo Dec 4, 2023
b3100f4
[ADD] car_rental: added pics to website
dhrs-odoo Dec 4, 2023
1c1a8cd
[ADD] car_rental: removed unwanted pictures and their corresponding r…
dhrs-odoo Dec 4, 2023
c73a280
[ADD] car_rental: base automation and server actions
dhrs-odoo Dec 7, 2023
e917748
[ADD] car_rental: second review suggested changes
dhrs-odoo Dec 20, 2023
292e8a8
[ADD] car_rental: base automation and server actions updated
dhrs-odoo Jan 4, 2024
5e921bf
[ADD] car_rental: server actions
dhrs-odoo Jan 16, 2024
98e7e94
[ADD] car_rental: server actions
dhrs-odoo Jan 16, 2024
17bbd03
[ADD] car_rental: [WIP] server_actions
dhrs-odoo Jan 18, 2024
2e2fa54
[ADD] car_rental: completed server actions
dhrs-odoo Mar 8, 2024
64818c6
[ADD] car_rental: completed server actions
dhrs-odoo Mar 8, 2024
863a5fd
[ADD] car_rental: adapted new changes
dhrs-odoo Mar 8, 2024
70a6a92
[ADD] car_rental: adapted new changes
dhrs-odoo Mar 8, 2024
0a50c33
[ADD] car_rental: remove the x_security
dhrs-odoo Mar 18, 2024
0add2e0
[ADD] car_rental: made the unit_amount field invisible
dhrs-odoo Mar 18, 2024
f5a8011
[ADD] car_rental: delivered quantity calculation
dhrs-odoo Mar 18, 2024
2ca9e8b
[ADD] car_rental: common changes
dhrs-odoo Mar 19, 2024
6422b94
[ADD] car_rental: common changes
dhrs-odoo Mar 19, 2024
397a3ac
[ADD] car_rental: common changes
dhrs-odoo Mar 19, 2024
2831583
[ADD] car_rental: fixed the create invoice issue
dhrs-odoo Mar 20, 2024
0e8eea1
[ADD] car_rental: functional changes
dhrs-odoo Mar 26, 2024
9de7622
[ADD] car_rental: payment provider demo and made all the product rent…
dhrs-odoo Mar 26, 2024
6de9dd7
[ADD] car_rental: added images and converted the webp image to jpg fo…
dhrs-odoo Mar 27, 2024
4e39f38
[ADD] car_rental: added fleet model file
dhrs-odoo Mar 27, 2024
00a9faf
[ADD] car_rental: test commit
dhrs-odoo Mar 29, 2024
018e647
[ADD] car_rental: test commit 1
dhrs-odoo Mar 29, 2024
73d11b3
[ADD] car_rental: sale order line test
dhrs-odoo Apr 1, 2024
973bbec
[ADD] car_rental: sale order line test1
dhrs-odoo Apr 1, 2024
68f6930
[ADD] car_rental: new commit test
dhrs-odoo Apr 1, 2024
f32a5b6
[ADD] car_rental: completed the product work without showing double p…
dhrs-odoo Apr 1, 2024
c8f9179
[ADD] car_rental: completed the product work without showing double p…
dhrs-odoo Apr 1, 2024
295e979
[ADD] car_rental: completed the product work without showing double p…
dhrs-odoo Apr 1, 2024
5f6575b
[ADD] car_rental: product pricing
dhrs-odoo Apr 2, 2024
8c24099
[ADD] car_rental: product pricing
dhrs-odoo Apr 2, 2024
9c47365
[ADD] car_rental: product pricing
dhrs-odoo Apr 2, 2024
e658247
[ADD] car_rental: product pricing
dhrs-odoo Apr 2, 2024
cc5647b
car_rental: solved the car image issue which is not showing in the pr…
dhrs-odoo Apr 4, 2024
f9e589c
[ADD] car_rental: review suggestions
dhrs-odoo Apr 19, 2024
e663f2f
remove fleet
vava-odoo Jun 25, 2024
f552f02
use stock lot instead of fleet
vava-odoo Jul 1, 2024
71d88ba
[ADD] car_rental: added the products and other updated changes
dhrs-odoo Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions car_rental/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
'name': 'Car Rental',
'version': '1.0',
'category': 'Services',
'description': """
This module is for car rental companies, for short or long-distance travel renting or tailored services based on the customer's specific requirements.
""",
'depends': [
'account_followup',
'base_automation',
'knowledge',
'payment_demo',
'project',
'timesheet_grid',
'purchase_stock',
'sale_management',
'web_studio',
'website_crm',
'website_sale_comparison',
'website_sale_stock_renting',
],
'data': [
'data/base_automation.xml',
'data/ir_model_fields.xml',
'data/ir_actions_server.xml',
'data/ir_ui_view.xml',
'data/ir_attachment_pre.xml',
'data/project_project.xml',
'data/product_template.xml',
'data/product_attribute.xml',
'data/product_attribute_value.xml',
'data/product_template_attribute_line.xml',
'data/product_template_attribute_value.xml',
'data/product_category.xml',
'data/product_product.xml',
'data/res_config_settings.xml',
'data/knowledge_cover.xml',
'data/knowledge_article.xml',
'data/ir_attachment_post.xml',
'data/website_view.xml',
'data/website_theme_apply.xml',
'data/ir_model_data.xml',
'data/mail_message.xml',
],
'demo': [
'demo/account_analytic_plan.xml',
'demo/account_analytic_account.xml',
'demo/project_project.xml',
'demo/website.xml',
'demo/res_partner.xml',
'demo/crm_team.xml',
'demo/crm_lead.xml',
'demo/product_pricing.xml',
'demo/product_supplierinfo.xml',
'demo/stock_lot.xml',
'demo/purchase_order.xml',
'demo/purchase_order_line.xml',
'demo/purchase_order_confirm.xml',
'demo/sale_order.xml',
'demo/sale_order_line.xml',
'demo/sale_order_post.xml',
'demo/purchase_order_line_post.xml',
'demo/website_ir_attachment.xml',
'demo/payment_provider_demo_post.xml',
'demo/website_view.xml',
'demo/website_theme_apply.xml',
],
'license': 'OPL-1',
dhrs-odoo marked this conversation as resolved.
Show resolved Hide resolved
'images': ['images/main.png'],
}
23 changes: 23 additions & 0 deletions car_rental/data/base_automation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="base_automation_when_car_booked" model="base.automation">
<field name="name">Update Car Status When Booked</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="filter_domain">[("state", "=", "sale")]</field>
<field name="filter_pre_domain">["|", ("state", "=", "draft"), ("state", "=", "sent")]</field>
<field name="trigger">on_create_or_write</field>
<field name="trigger_field_ids" eval="[(6, 0, [ref('sale.field_sale_order_line__state')])]"/>
</record>
<record id="base_automation_when_returned" model="base.automation">
<field name="name">Update Car Status When Returned</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="filter_domain">[("x_rental_status", "=", "returned")]</field>
<field name="filter_pre_domain">[("x_rental_status", "=", "return")]</field>
<field name="trigger">on_create_or_write</field>
</record>
<record id="base_automation_update_hours" model="base.automation">
<field name="name">Update the Hours</field>
<field name="model_id" ref="account.model_account_analytic_line"/>
<field name="trigger">on_create</field>
</record>
</odoo>
12 changes: 12 additions & 0 deletions car_rental/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="ir_act_update_the_hours" model="ir.actions.server">
<field name="name">Update the Hours - Server Actions</field>
<field name="model_id" ref="account.model_account_analytic_line"/>
<field name="base_automation_id" ref="base_automation_update_hours"/>
<field name="state">code</field>
<field name="code"><![CDATA[
record.write({'unit_amount': record.x_total_km})
]]></field>
</record>
</odoo>
15 changes: 15 additions & 0 deletions car_rental/data/ir_attachment_post.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="ir_attachment_687" model="ir.attachment">
<field name="name">Audi-A5-Sportback-120420212020.jpg</field>
<field name="datas" type="base64" file="car_rental/static/src/binary/ir_attachment/687-Audi-A5-Sportback-120420212020.jpg"/>
</record>
<record id="ir_attachment_698" model="ir.attachment">
<field name="name">Audi-A5-Sportback-Interior-1-lg.webp</field>
<field name="datas" type="base64" file="car_rental/static/src/binary/ir_attachment/698-Audi-A5-Sportback-Interior-1-lg.webp"/>
</record>
<record id="ir_attachment_706" model="ir.attachment">
<field name="name">Audi-A5-Sportback-Interior-3-lg.webp</field>
<field name="datas" type="base64" file="car_rental/static/src/binary/ir_attachment/706-Audi-A5-Sportback-Interior-3-lg.webp"/>
</record>
</odoo>
7 changes: 7 additions & 0 deletions car_rental/data/ir_attachment_pre.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="ir_attachment_499" model="ir.attachment">
<field name="name">137981359.webp</field>
<field name="datas" type="base64" file="car_rental/static/src/binary/ir_attachment/499-137981359.webp"/>
</record>
</odoo>
9 changes: 9 additions & 0 deletions car_rental/data/ir_model_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="cloc_exclude_website_view" model="ir.model.data">
<field name="name">cloc_exclude_website_view</field>
<field name="model">ir.ui.view</field>
<field name="module">__cloc_exclude__</field>
<field name="res_id" eval="ref('contactus')"/>
</record>
</odoo>
65 changes: 65 additions & 0 deletions car_rental/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="new_integer_lot_odometer" model="ir.model.fields">
<field name="name">x_last_odometer</field>
<field name="model_id" ref="stock.model_stock_lot"/>
<field name="field_description">Last Odometer (km)</field>
<field name="ttype">integer</field>
</record>
<record id="new_related_field_sa_rental_status" model="ir.model.fields">
<field name="name">x_rental_status</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="field_description">Rental Status</field>
<field name="related">order_id.rental_status</field>
<field name="selection">[('draft', 'Quotation'), ('sent', 'Quotation Sent'), ('pickup', 'Reserved'), ('return', 'Pickedup'), ('returned', 'Returned'), ('cancel', 'Cancelled')]</field>
<field name="ttype">selection</field>
</record>
<record id="new_decimal_analytic_in_odometer" model="ir.model.fields">
<field name="name">x_in_odometer</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="field_description">In Odometer</field>
<field name="ttype">float</field>
</record>
<record id="new_decimal_analytic_out_odometer" model="ir.model.fields">
<field name="name">x_out_odometer</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="field_description">Out Odometer</field>
<field name="ttype">float</field>
</record>
<record id="new_decimal_analytic_total_km" model="ir.model.fields">
<field name="name">x_total_km</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
<field name="compute"><![CDATA[for record in self:
record['x_total_km'] = record.x_in_odometer - record.x_out_odometer]]></field>
<field name="depends">x_in_odometer,x_out_odometer</field>
<field name="field_description">Total KM</field>
<field name="ttype">float</field>
</record>
<record id="new_many2one_purchas_task" model="ir.model.fields">
<field name="name">x_task</field>
<field name="model_id" ref="purchase.model_purchase_order_line"/>
<field name="field_description">Task</field>
<field name="relation">project.task</field>
<field name="ttype">many2one</field>
</record>
<record id="new_many2one_task_vendor" model="ir.model.fields">
<field name="name">x_vendor</field>
<field name="model_id" ref="project.model_project_task"/>
<field name="field_description">Vendor</field>
<field name="relation">res.partner</field>
<field name="ttype">many2one</field>
</record>
<record id="new_text_contact_licence_no" model="ir.model.fields">
<field name="name">x_licence_no</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="field_description">Licence No. </field>
<field name="ttype">char</field>
</record>
<record id="new_related_field_sa_licence_no" model="ir.model.fields">
<field name="name">x_licence_no</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="field_description">Licence No.</field>
<field name="related">partner_id.x_licence_no</field>
<field name="ttype">char</field>
</record>
</odoo>
93 changes: 93 additions & 0 deletions car_rental/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="stock_lot_form" model="ir.ui.view">
<field name="inherit_id" ref="stock.view_production_lot_form"/>
<field name="mode">extension</field>
<field name="model">stock.lot</field>
<field name="name">stock.production.lot.form</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="string">License Plate</attribute>
</field>
<field name="location_id" position="after">
<field name="x_last_odometer"/>
</field>
</field>
</record>
<record id="stock_lot_tree" model="ir.ui.view">
<field name="inherit_id" ref="stock.view_production_lot_tree"/>
<field name="mode">extension</field>
<field name="model">stock.lot</field>
<field name="name">stock.production.lot.tree</field>
<field name="priority">99</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<data>
<field name="name" position="attributes">
<attribute name="string">License Plate</attribute>
</field>
</data>
</field>
</record>
<record id="project_project_task_form" model="ir.ui.view">
<field name="name">project.task.form.customization</field>
<field name="model">project.task</field>
<field name="inherit_id" ref="project.view_task_form2"/>
<field name="mode">extension</field>
<field name="priority">1000</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_vendor" string="Vendor"/>
</xpath>
<xpath expr="//field[@name='timesheet_ids']//tree//field[@name='name']" position="after">
<field optional="show" name="x_out_odometer" string="Out Odometer"/>
<field optional="show" name="x_in_odometer" string="In Odometer"/>
<field optional="show" name="x_total_km" string="Total KM"/>
</xpath>
<xpath expr="//page[@name='page_timesheets']//field[@name='timesheet_ids']//tree//field[@name='unit_amount']" position="attributes">
<attribute name="column_invisible">True</attribute>
</xpath>
</field>
</record>
<record id="purchase_purchase_order_form" model="ir.ui.view">
<field name="name">purchase.order.form.customization</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="mode">extension</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
<field optional="show" name="x_task" string="Task"/>
</xpath>
</field>
</record>
<record id="rental_rental_order_form" model="ir.ui.view">
<field name="name">rental.order.form.customization</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_renting.rental_order_primary_form_view"/>
<field name="mode">extension</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="x_licence_no" string="Licence No."/>
</xpath>
</field>
</record>
<record id="res_part_form" model="ir.ui.view">
<field name="name">res.partner.form.customization</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="mode">extension</field>
<field name="priority">360</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//form[1]/sheet[1]/group[1]/group[1]/div[1]" position="after">
<field name="x_licence_no" string="Licence No. "/>
</xpath>
</field>
</record>
</odoo>
Loading