Skip to content

Commit

Permalink
[ADD] car_rental: second review suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Dec 20, 2023
1 parent 175bb31 commit 7ce9e16
Show file tree
Hide file tree
Showing 19 changed files with 92 additions and 231 deletions.
1 change: 0 additions & 1 deletion car_rental/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
'data/res_config_settings.xml',
'data/knowledge_cover.xml',
'data/knowledge_article.xml',
'data/knowledge_article_member.xml',
'data/ir_attachment_post.xml',
],
'demo': [
Expand Down
6 changes: 0 additions & 6 deletions car_rental/data/ir_attachment_post.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="ir_attachment_684" model="ir.attachment">
<field name="name">unsplash_ovrOPhu8vSw_car.webp</field>
<field name="datas" type="base64" file="car_rental/static/src/binary/ir_attachment/684-unsplash_ovrOPhu8vSw_car.webp"/>
<field name="res_model">ir.attachment</field>
<field name="website_id" ref="website.default_website"/>
</record>
<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"/>
Expand Down
30 changes: 14 additions & 16 deletions car_rental/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="new_decimal_analytic_572a5f52-d008-4150-a715-14e2462f8244" model="ir.model.fields">
<record id="new_decimal_analytic_in_odometer" model="ir.model.fields">
<field name="name">x_in_odometer</field>
<field name="model">account.analytic.line</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_e866fd7b-409e-42e3-864a-82beca96e66d" model="ir.model.fields">
<record id="new_decimal_analytic_out_odometer" model="ir.model.fields">
<field name="name">x_out_odometer</field>
<field name="model">account.analytic.line</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_64689165-d621-445d-bf49-f03d161262b7" model="ir.model.fields">
<record id="new_decimal_analytic_total_km" model="ir.model.fields">
<field name="name">x_total_km</field>
<field name="model">account.analytic.line</field>
<field name="model_id" ref="analytic.model_account_analytic_line"/>
Expand All @@ -25,46 +25,46 @@
<field name="readonly" eval="True"/>
<field name="ttype">float</field>
</record>
<record id="new_many2one_product_1118051d-f5fc-42c8-8585-2211863a23ff" model="ir.model.fields">
<record id="new_many2one_product_vehicle_no" model="ir.model.fields">
<field name="name">x_vehicle_no</field>
<field name="model">product.template</field>
<field name="model_id" ref="product.model_product_template"/>
<field name="field_description">Vehicle No.</field>
<field name="relation">fleet.vehicle</field>
<field name="ttype">many2one</field>
</record>
<record id="new_many2one_purchas_09c6869c-aee9-44ee-a629-a005a9ed2c97" model="ir.model.fields">
<record id="new_many2one_purchas_task" model="ir.model.fields">
<field name="name">x_task</field>
<field name="model">purchase.order.line</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_service_63929119-86b9-49aa-babd-87eaf63d7f90" model="ir.model.fields">
<record id="new_many2one_service_vehicle_status" model="ir.model.fields">
<field name="name">x_vehicle_status</field>
<field name="model">fleet.vehicle.log.services</field>
<field name="model_id" ref="fleet.model_fleet_vehicle_log_services"/>
<field name="field_description">Vehicle Status</field>
<field name="relation">fleet.vehicle.state</field>
<field name="ttype">many2one</field>
</record>
<record id="new_many2one_task_28f37101-5082-4cdc-8aa1-ee7a66ef81c3" model="ir.model.fields">
<record id="new_many2one_task_vendor" model="ir.model.fields">
<field name="name">x_vendor</field>
<field name="model">project.task</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_monetary_sales_o_24f7083d-cdd4-4e4d-b9ed-8f62aa60f374" model="ir.model.fields">
<record id="new_monetary_sales_security_deposit" model="ir.model.fields">
<field name="name">x_security_deposit</field>
<field name="model">sale.order</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="field_description">Security Deposit</field>
<field name="ttype">float</field>
</record>
<record id="new_one2many_vehicle_37e5c4e3-5258-41d6-ac3b-4590323f9100" model="ir.model.fields">
<record id="new_one2many_vehicle_product_fleet" model="ir.model.fields">
<field name="name">x_product_name_fleet</field>
<field name="model">fleet.vehicle</field>
<field name="model_id" ref="fleet.model_fleet_vehicle"/>
Expand All @@ -73,14 +73,14 @@
<field name="relation_field">x_vehicle_no</field>
<field name="ttype">one2many</field>
</record>
<record id="new_text_contact_c60cc1e1-8b64-41ad-a1cd-644f0dfb8af0" model="ir.model.fields">
<record id="new_text_contact_licence_no" model="ir.model.fields">
<field name="name">x_licence_no</field>
<field name="model">res.partner</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_0a3aa1b1-4d73-4e58-a311-4091ec3bb6e0" model="ir.model.fields">
<record id="new_related_field_sa_licence_no" model="ir.model.fields">
<field name="name">x_licence_no</field>
<field name="model">sale.order</field>
<field name="model_id" ref="sale.model_sale_order"/>
Expand All @@ -89,7 +89,7 @@
<field name="related">partner_id.x_licence_no</field>
<field name="ttype">char</field>
</record>
<record id="new_related_field_sa_25fd21b0-0335-4fd6-bda2-d905f1846755" model="ir.model.fields">
<record id="new_related_field_sa_rental_status" model="ir.model.fields">
<field name="name">x_rental_status</field>
<field name="model">sale.order.line</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
Expand All @@ -99,25 +99,23 @@
<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_related_field_sa_d4f91f4c-4b7b-4705-a0b8-e2718b162bc2" model="ir.model.fields">
<record id="new_related_field_sa_car" model="ir.model.fields">
<field name="name">x_car</field>
<field name="model">sale.order.line</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="field_description">Car</field>
<field name="readonly" eval="True"/>
<field name="related">product_id.x_vehicle_no</field>
<field name="relation">fleet.vehicle</field>
<field name="store" eval="False"/>
<field name="ttype">many2one</field>
</record>
<record id="new_related_field_sa_3d5345a1-e715-4ea1-8a5d-88a4dd65376e" model="ir.model.fields">
<record id="new_related_field_sa_car_status" model="ir.model.fields">
<field name="name">x_car_status</field>
<field name="model">sale.order.line</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="field_description">Car Status</field>
<field name="related">x_car.state_id</field>
<field name="relation">fleet.vehicle.state</field>
<field name="store" eval="False"/>
<field name="ttype">many2one</field>
</record>
</odoo>
23 changes: 9 additions & 14 deletions car_rental/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="odoo_studio_fleet_ve_3fae68ac-5ff8-435b-b91d-efb9944dee05" model="ir.ui.view">
<record id="fleet_ve_log_services_form" model="ir.ui.view">
<field name="name">fleet.vehicle.log.services.form.customization</field>
<field name="model">fleet.vehicle.log.services</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_log_services_view_form"/>
Expand All @@ -9,24 +9,19 @@
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='vendor_id']" position="after">
<field name="x_vehicle_status" string="Vehicle Status"/>
<field name="x_vehicle_status"/>
</xpath>
</field>
</record>
<record id="odoo_studio_fleet_ve_a2831b47-fc83-4120-a7f1-7e0ba38d7874" model="ir.ui.view">
<record id="fleet_ve_form" model="ir.ui.view">
<field name="name">fleet.vehicle.form.customization</field>
<field name="model">fleet.vehicle</field>
<field name="inherit_id" ref="fleet.fleet_vehicle_view_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='location']" position="after">
<field name="x_product_name_fleet" invisible="1"/>
</xpath>
</field>
</record>
<record id="odoo_studio_product__d497eee1-f0c6-460d-ab22-af75533b6a03" model="ir.ui.view">
<record id="product_template_product_form" model="ir.ui.view">
<field name="name">product.template.product.form.customization</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view"/>
Expand All @@ -39,7 +34,7 @@
</xpath>
</field>
</record>
<record id="odoo_studio_project__11cc2179-021b-4057-88b3-78d47a16ca34" model="ir.ui.view">
<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"/>
Expand All @@ -60,7 +55,7 @@
</xpath>
</field>
</record>
<record id="odoo_studio_purchase_02d7e16d-b81b-46a1-8dc1-145c6226e4d9" model="ir.ui.view">
<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"/>
Expand All @@ -73,7 +68,7 @@
</xpath>
</field>
</record>
<record id="odoo_studio_rental_o_ed1928d3-6ede-47c8-864e-f4fd1a7e1729" model="ir.ui.view">
<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"/>
Expand All @@ -88,13 +83,13 @@
<field name="x_security_deposit" string="Security Deposit" widget="monetary"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
<field optional="show" name="x_car" string="Car" invisible="1" attrs="{'readonly': True}"/>
<field optional="show" name="x_car" string="Car" invisible="1"/>
<field optional="show" name="x_car_status" string="Car Status"/>
<field optional="show" name="x_rental_status" string="Rental Status"/>
</xpath>
</field>
</record>
<record id="odoo_studio_res_part_fad9bf29-eb91-4862-8582-0c7cd0f70921" model="ir.ui.view">
<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"/>
Expand Down
1 change: 1 addition & 0 deletions car_rental/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<field name="is_published" eval="True"/>
<field name="is_locked" eval="True"/>
<field name="internal_permission">write</field>
<field name="is_article_visible_by_everyone" eval="True"/>
<field name="cover_image_id" ref="knowledge_cover_2"/>
<field name="body">
<![CDATA[
Expand Down
8 changes: 0 additions & 8 deletions car_rental/data/knowledge_article_member.xml

This file was deleted.

49 changes: 0 additions & 49 deletions car_rental/data/product_product.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="product_product_10" model="product.product">
<field name="product_tmpl_id" ref="product_template_12"/>
</record>
<record id="product_product_11" model="product.product">
<field name="product_tmpl_id" ref="product_template_13"/>
</record>
<record id="product_product_12" model="product.product">
<field name="product_tmpl_id" ref="product_template_14"/>
</record>
<record id="product_product_14" model="product.product">
<field name="standard_price">5.0</field>
<field name="product_tmpl_id" ref="product_template_16"/>
Expand All @@ -21,48 +12,8 @@
<field name="default_code">RENTAL</field>
<field name="product_tmpl_id" ref="product_template_18"/>
</record>
<record id="product_product_17" model="product.product">
<field name="base_unit_count" eval="False"/>
<field name="product_tmpl_id" ref="product_template_19"/>
</record>
<record id="product_product_18" model="product.product">
<field name="base_unit_count" eval="False"/>
<field name="product_tmpl_id" ref="product_template_20"/>
</record>
<record id="product_product_19" model="product.product">
<field name="base_unit_count" eval="False"/>
<field name="product_tmpl_id" ref="product_template_21"/>
</record>
<record id="product_product_20" model="product.product">
<field name="base_unit_count" eval="False"/>
<field name="product_tmpl_id" ref="product_template_22"/>
</record>
<record id="product_product_3" model="product.product">
<field name="product_tmpl_id" ref="product_template_5"/>
</record>
<record id="product_product_4" model="product.product">
<field name="standard_price">7.0</field>
<field name="product_tmpl_id" ref="product_template_6"/>
</record>
<record id="product_product_5" model="product.product">
<field name="product_tmpl_id" ref="product_template_7"/>
</record>
<record id="product_product_6" model="product.product">
<field name="product_tmpl_id" ref="product_template_8"/>
</record>
<record id="product_product_7" model="product.product">
<field name="product_tmpl_id" ref="product_template_9"/>
</record>
<record id="product_product_8" model="product.product">
<field name="product_tmpl_id" ref="product_template_10"/>
</record>
<record id="product_product_9" model="product.product">
<field name="product_tmpl_id" ref="product_template_11"/>
</record>
<record id="delivery.product_product_delivery" model="product.product">
<field name="product_tmpl_id" ref="delivery.product_product_delivery_product_template"/>
</record>
<record id="sale_timesheet.time_product" model="product.product">
<field name="product_tmpl_id" ref="sale_timesheet.time_product_product_template"/>
</record>
</odoo>

0 comments on commit 7ce9e16

Please sign in to comment.