2018-01-16 06:58:15 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2018-01-16 11:34:37 +01:00
|
|
|
<flectra>
|
2018-01-16 06:58:15 +01:00
|
|
|
<record id='fleet_vehicle_model_view_form' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.form</field>
|
|
|
|
<field name="model">fleet.vehicle.model</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Model">
|
|
|
|
<sheet>
|
|
|
|
<field name="image_medium" widget='image' class="oe_avatar"/>
|
|
|
|
<div class="oe_title">
|
|
|
|
<label for="name" class="oe_edit_only"/>
|
|
|
|
<h1>
|
|
|
|
<field name="name" placeholder="e.g. Model S"/>
|
|
|
|
</h1>
|
|
|
|
<label for="brand_id" class="oe_edit_only"/>
|
|
|
|
<h2>
|
|
|
|
<field name="brand_id" placeholder="e.g. Tesla"/>
|
|
|
|
</h2>
|
|
|
|
</div>
|
|
|
|
<notebook>
|
|
|
|
<page string="Vendors" name="vendors">
|
|
|
|
<field name="vendors" widget="many2many_kanban">
|
|
|
|
<kanban quick_create="false" create="true">
|
|
|
|
<field name="name"/>
|
|
|
|
<templates>
|
|
|
|
<t t-name="kanban-box">
|
|
|
|
<div style="position: relative">
|
|
|
|
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block"><i class="fa fa-times text-danger"/></a>
|
|
|
|
<div class="oe_module_vignette">
|
|
|
|
<div class="oe_module_desc o_kanban_record_title">
|
|
|
|
<field name="name"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</templates>
|
|
|
|
</kanban>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_view_tree' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.tree</field>
|
|
|
|
<field name="model">fleet.vehicle.model</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree string="Models">
|
|
|
|
<field name="brand_id" />
|
|
|
|
<field name="name" />
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_view_search' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.search</field>
|
|
|
|
<field name="model">fleet.vehicle.model</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search string="Vehicles costs" >
|
|
|
|
<field name="brand_id" />
|
|
|
|
<group expand="1" string="Group By">
|
|
|
|
<filter name="groupby_brand" context="{'group_by' : 'brand_id'}" string="Make"/>
|
|
|
|
</group>
|
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_action' model='ir.actions.act_window'>
|
|
|
|
<field name="name">Vehicle Model</field>
|
|
|
|
<field name="res_model">fleet.vehicle.model</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="context">{"search_default_groupby_brand" : True,}</field>
|
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
Click to create a new model.
|
|
|
|
</p><p>
|
|
|
|
You can define several models (e.g. A3, A4) for each make (Audi).
|
|
|
|
</p>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<menuitem name="Fleet" id="menu_root" sequence="115" groups="fleet_group_user" web_icon="fleet,static/description/icon.png"/>
|
|
|
|
<menuitem name="Configuration" parent="menu_root" id="fleet_configuration" sequence="100" groups="fleet_group_manager"/>
|
|
|
|
<menuitem action="fleet_vehicle_model_action" parent="fleet_configuration" id="fleet_vehicle_model_menu" sequence="1"/>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_brand_view_tree' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.brand.tree</field>
|
|
|
|
<field name="model">fleet.vehicle.model.brand</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree string="Model Make">
|
|
|
|
<field name="name" />
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_brand_view_form' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.brand.form</field>
|
|
|
|
<field name="model">fleet.vehicle.model.brand</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Model Make">
|
|
|
|
<group>
|
|
|
|
<div>
|
|
|
|
<field name="image_medium" widget="image" class="oe_avatar"/>
|
|
|
|
<label for="name" class="oe_edit_only"/>
|
|
|
|
<h1>
|
|
|
|
<field name="name"/>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_brand_view_kanban' model='ir.ui.view'>
|
|
|
|
<field name="name">fleet.vehicle.model.brandkanban</field>
|
|
|
|
<field name="model">fleet.vehicle.model.brand</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<kanban>
|
|
|
|
<field name="id"/>
|
|
|
|
<field name="name" />
|
|
|
|
<field name="image" />
|
|
|
|
<templates>
|
|
|
|
<t t-name="kanban-box">
|
|
|
|
<div class="oe_kanban_vignette oe_semantic_html_override">
|
|
|
|
<a type="open" href="#" class="o_kanban_image oe_kanban_action">
|
|
|
|
<img t-att-src="kanban_image('fleet.vehicle.model.brand', 'image_small', record.id.raw_value)" class="img-responsive" style="width:100px;"/>
|
|
|
|
</a>
|
|
|
|
<div class="oe_kanban_details">
|
|
|
|
<h4 class="oe_partner_heading">
|
|
|
|
<a type="open" class="o_kanban_record_title">
|
|
|
|
<field name="name"/>
|
|
|
|
</a>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</templates>
|
|
|
|
</kanban>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id='fleet_vehicle_model_brand_action' model='ir.actions.act_window'>
|
|
|
|
<field name="name">Model make of Vehicle</field>
|
|
|
|
<field name="res_model">fleet.vehicle.model.brand</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
Click to create a new make.
|
|
|
|
</p>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<menuitem action="fleet_vehicle_model_brand_action" parent="fleet_configuration" id="fleet_vehicle_model_brand_menu" sequence="2"/>
|
2018-01-16 11:34:37 +01:00
|
|
|
</flectra>
|