<odoo>

    <record id="account_asset_transfer_view_form" model="ir.ui.view">
        <field name="name">account.asset.transfer.form</field>
        <field name="model">account.asset.transfer</field>
        <field name="arch" type="xml">
            <form string="Transfer Asset">
                <group>
                    <group>
                        <field name="date_transfer" />
                        <field name="company_id" groups="base.group_multi_company" />
                        <field name="currency_id" invisible="1" />
                        <field name="from_asset_value" />
                        <field name="to_asset_value" />
                        <field name="balance" invisible="1" />
                    </group>
                    <group>
                        <field name="transfer_journal_id" />
                        <field name="partner_id" invisible="1" />
                        <field name="analytic_account_id" invisible="1" />
                        <field name="analytic_tag_ids" invisible="1" />
                    </group>
                </group>
                <notebook>
                    <page name="to_asset" string="To New Asset">
                        <div class="oe_right" name="buttons">
                            <button
                                name="expand_to_asset_ids"
                                type="object"
                                string="Expand Asset"
                                icon="fa-bars"
                            />
                        </div>
                        <field
                            name="to_asset_ids"
                            context="{
                                'default_asset_value': balance,
                                'default_partner_id': partner_id,
                                'default_analytic_account_id': analytic_account_id,
                                'default_analytic_tag_ids': analytic_tag_ids,
                            }"
                        >
                            <tree editable="bottom">
                                <field name="asset_profile_id" />
                                <field name="asset_name" />
                                <field name="price_unit" />
                                <field name="quantity" />
                                <field name="asset_value" />
                                <field name="partner_id" />
                                <field
                                    name="analytic_account_id"
                                    groups="analytic.group_analytic_accounting"
                                />
                                <field
                                    name="analytic_tag_ids"
                                    groups="analytic.group_analytic_accounting"
                                    widget="many2many_tags"
                                />
                            </tree>
                        </field>
                    </page>
                    <page name="from_asset" string="From">
                        <field name="from_asset_ids" force_save="1" />
                    </page>
                </notebook>
                <separator string="Notes" colspan="4" />
                <field name="note" nolabel="1" colspan="4" />
                <separator colspan="4" />
                <footer>
                    <button
                        string="Transfer"
                        name="transfer"
                        type="object"
                        class="oe_highlight"
                    />
                    <button string="Cancel" class="oe_link" special="cancel" />
                </footer>
            </form>
        </field>
    </record>

    <record id="action_account_asset_transfer" model="ir.actions.act_window">
        <field name="name">Transfer Asset</field>
        <field name="res_model">account.asset.transfer</field>
        <field name="view_mode">form</field>
        <field name="target">new</field>
    </record>

    <record id="action_asset_transfer_from_list" model="ir.actions.server">
        <field name="name">Transfer Asset</field>
        <field name="groups_id" eval="[(4, ref('account.group_account_manager'))]" />
        <field name="model_id" ref="account_asset_management.model_account_asset" />
        <field
            name="binding_model_id"
            ref="account_asset_management.model_account_asset"
        />
        <field name="binding_view_types">list</field>
        <field name="state">code</field>
        <field name="code">
if records:
    action = records.transfer()
        </field>
    </record>

</odoo>
