<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_marketplace_order_stage_kanban" model="ir.ui.view">
            <field name="name">marketplace.order.stage.kanban</field>
            <field name="model">marketplace.order.stage</field>
            <field name="arch" type="xml">
                <kanban>
                    <field name="name"/>
                    <field name="stage_type"/>
                    <field name="transport_type"/>
                    <field name="source_location_id"/>
                    <field name="destination_location_id"/>
                    <field name="location_id"/>
                    <templates>
                        <t t-name="kanban-box">
                            <div class="oe_kanban_card oe_kanban_global_click">
                                <div class="o_kanban_record_top">
                                    <div class="o_kanban_record_headings">
                                        <strong class="o_kanban_record_title">
                                            <field name="name"/>
                                        </strong>
                                        <div class="o_kanban_record_subtitle">
                                            <t t-if="record.stage_type.raw_value == 'transport'">
                                                <i class="fa fa-truck" title="Transport"/>
                                                <field name="transport_type"/>
                                            </t>
                                            <t t-else="">
                                                <i class="fa fa-cogs" title="Service"/> Service
                                            </t>
                                        </div>
                                    </div>
                                </div>
                                <div class="o_kanban_record_body">
                                    <div t-if="record.stage_type.raw_value == 'transport'" class="mb-2">
                                        <i class="fa fa-map-marker" title="Route"/>
                                        <field name="source_location_id"/> → <field name="destination_location_id"/>
                                    </div>
                                    <div t-else="" class="mb-2">
                                        <i class="fa fa-map-marker" title="Location"/>
                                        <field name="location_id"/>
                                    </div>
                                </div>
                            </div>
                        </t>
                    </templates>
                </kanban>
            </field>
        </record>
    </data>
</odoo>
