<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_marketplace_order_stage_form" model="ir.ui.view">
            <field name="name">marketplace.order.stage.form</field>
            <field name="model">marketplace.order.stage</field>
            <field name="arch" type="xml">
                <form string="Order Stage">
                    <sheet>
                        <group>
                            <group>
                                <field name="name"/>
                                <field name="order_id"/>
                                <field name="sequence"/>
                                <field name="stage_type"/>
                                <field name="transport_type" invisible="stage_type != 'transport'"/>
                            </group>
                            <group>
                                <field name="source_location_id" invisible="stage_type != 'transport'"/>
                                <field name="destination_location_id" invisible="stage_type != 'transport'"/>
                                <field name="location_id" invisible="stage_type != 'service'"/>
                                <field name="selected_carrier_id" invisible="stage_type != 'service'"/>
                            </group>
                        </group>
                        <notebook>
                            <page string="Trips" invisible="stage_type != 'transport'">
                                <field name="trip_ids">
                                    <list>
                                        <field name="sequence"/>
                                        <field name="name"/>
                                        <field name="carrier_id"/>
                                        <field name="planned_weight"/>
                                        <field name="weight_at_loading"/>
                                        <field name="weight_at_unloading"/>
                                    </list>
                                </field>
                            </page>
                        </notebook>
                    </sheet>
                </form>
            </field>
        </record>
    </data>
</odoo>
