Files
odoo_source/addons/fleet/views/fleet_vehicle_model_views.xml
T
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00

159 lines
7.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<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="o_view_nocontent_smiling_face">
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="o_view_nocontent_smiling_face">
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"/>
</odoo>