<?xml version="1.0" encoding="utf-8" ?>
<odoo>

    <!-- Tree View -->
    <record id="cx_tower_git_source_view_tree" model="ir.ui.view">
        <field name="name">cx.tower.git.source.tree</field>
        <field name="model">cx.tower.git.source</field>
        <field name="arch" type="xml">
            <tree>
                <field name="name" />
                <field name="git_project_id" />
            </tree>
        </field>
    </record>

    <!-- Form View -->
    <record id="cx_tower_git_source_view_form" model="ir.ui.view">
        <field name="name">cx.tower.git.source.form</field>
        <field name="model">cx.tower.git.source</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <widget
                        name="web_ribbon"
                        title="Disabled"
                        bg_color="bg-danger"
                        attrs="{'invisible': [('enabled', '=', True)]}"
                    />
                    <div class="oe_title">
                        <h1>
                            <field
                                name="name"
                                placeholder="Name. Leave blank to autogenerate"
                            />
                        </h1>
                        <h3>
                            <field
                                name="reference"
                                placeholder="Reference. Can contain English letters, digits and '_'. Leave blank to autogenerate"
                                attrs="{'invisible': [('reference', '=', False)]}"
                            />
                        </h3>
                    </div>
                    <group>
                        <field name="sequence" />
                        <field name="enabled" />
                        <field name="active" invisible="1" />
                    </group>
                    <notebook>
                        <page name="remotes" string="Remotes">
                        <div
                                class="alert alert-warning"
                                role="alert"
                                style="margin-bottom:0px;"
                                attrs="{'invisible': [('remote_count', '&lt;', 2)]}"
                            >
                            <p>
                                The top one remote will be used as a merge target.
                                You can re-arrange remotes by dragging them or changing their sequence value.
                            </p>
                        </div>
                            <field name="remote_count" invisible="1" />
                            <field name="remote_ids">
                                <tree
                                    decoration-muted="not enabled"
                                    decoration-info="is_private == True"
                                >
                                    <field name="sequence" widget="handle" />
                                    <field name="repo_id" />
                                    <field name="head_type" />
                                    <field name="head" />
                                    <field name="url_protocol" />
                                    <field name="enabled" widget="boolean_toggle" />
                                    <field name="is_private" optional="hide" />
                                    <field name="reference" optional="hide" />
                                    <field name="create_uid" optional="hide" />
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    </odoo>
