You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
5.3 KiB
107 lines
5.3 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<!--Action of fleet.subscription-->
|
|
<record id="fleet_subscription_action" model="ir.actions.act_window">
|
|
<field name="name">Subscription</field>
|
|
<field name="res_model">fleet.subscription</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
<!-- Form view of the fleet subscription-->
|
|
<record id="fleet_subscription_view_form" model="ir.ui.view">
|
|
<field name="name">fleet.subscription.view.form</field>
|
|
<field name="model">fleet.subscription</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Subscription">
|
|
<header>
|
|
<button name="action_invoice" class="oe_highlight"
|
|
string="Create Order"
|
|
type="object"
|
|
invisible="state != 'draft'"/>
|
|
<button name="action_request" class="oe_highlight"
|
|
string="Change subscription"
|
|
type="object"
|
|
invisible="state != 'subscribed' and invisible_sub == True"/>
|
|
<button name="action_cancel" class="oe_highlight"
|
|
string="Cancel subscription"
|
|
type="object"
|
|
invisible="state == 'draft' or state != 'subscribed'"/>
|
|
<field name="state" widget="statusbar"
|
|
options="{'clickable': '1'}"/>
|
|
</header>
|
|
<sheet>
|
|
<div name="button_box" position="inside">
|
|
<button class="oe_stat_button" type="object"
|
|
name="action_get_car_insurance"
|
|
icon="fa-car"
|
|
invisible="insurance_type_id == False"
|
|
string="Insurance">
|
|
</button>
|
|
<button class="oe_stat_button" type="object"
|
|
name="action_get_sale"
|
|
invisible="state == 'draft'">
|
|
<field string="Sale Order" name="sale"
|
|
widget="statinfo"/>
|
|
</button>
|
|
<button class="oe_stat_button" type="object"
|
|
name="action_get_refund"
|
|
invisible="refund == 0 and state != 'cancel'">
|
|
<field string="Refund" name="refund"
|
|
widget="statinfo"/>
|
|
</button>
|
|
</div>
|
|
<group col="2">
|
|
<group>
|
|
<field name="vehicle_id"/>
|
|
<field name="vehicle_ids" widget="many2many_tags"
|
|
invisible="True"/>
|
|
<field name="customer_id"/>
|
|
<field name="insurance_type_id"/>
|
|
<field name="seating_capacity"/>
|
|
<field name="price"/>
|
|
<field name="sale_id" invisible="True"/>
|
|
<field name="extra_price"/>
|
|
<field name="invoice_ids" widget="many2many_tags"
|
|
invisible="True"/>
|
|
<field name="invisible_sub" invisible="True"/>
|
|
</group>
|
|
<group>
|
|
<field name="start_date"/>
|
|
<field name="end_date"/>
|
|
<field name="cancellation_date"
|
|
invisible="state != 'cancel'"/>
|
|
<field name="city"/>
|
|
<field name="state_id"/>
|
|
<field name="country_id"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Features">
|
|
<group string="Add Extra Features">
|
|
<field name="fuel"/>
|
|
<field name="fuel_type"
|
|
invisible="fuel != 'with_fuel'"/>
|
|
<field name="mileage"
|
|
invisible="fuel != 'with_fuel'"/>
|
|
<field name="fuel_rate"
|
|
invisible="fuel != 'with_fuel'"/>
|
|
<field name="charge_km"/>
|
|
<field name="default_km"/>
|
|
<field name="extra_km"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!--Menu item of vehicle subscription-->
|
|
<menuitem id="vehicle_subscription_menu_action"
|
|
name="Subscription"
|
|
action="fleet_subscription_action"
|
|
parent="fleet.fleet_vehicles"
|
|
/>
|
|
</odoo>
|
|
|