<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_skeen_corte_caja_tree" model="ir.ui.view">
            <field name="name">skeen.corte.caja.tree</field>
            <field name="model">skeen.corte.caja</field>
            <field name="arch" type="xml">
                <tree decoration-muted="state=='closed'">
                    <field name="name" />
                    <field name="date" />
                    <field name="user_id" />
                    <field name="opening_cash" />
                    <field name="total_cash" />
                    <field name="total_card" />
                    <field name="total_sales" />
                    <field name="closing_cash" />
                    <field name="difference" />
                    <field name="state" />
                </tree>
            </field>
        </record>

        <record id="view_skeen_corte_caja_form" model="ir.ui.view">
            <field name="name">skeen.corte.caja.form</field>
            <field name="model">skeen.corte.caja</field>
            <field name="arch" type="xml">
                <form>
                    <header>
                        <button name="action_close" string="Cerrar Caja" type="object" invisible="state != 'open'" class="oe_highlight" />
                        <button name="action_reopen" string="Reabrir" type="object" invisible="state != 'closed'" />
                        <field name="state" widget="statusbar" />
                    </header>
                    <sheet>
                        <group>
                            <group>
                                <field name="name" />
                                <field name="date" />
                                <field name="user_id" />
                                <field name="opening_cash" />
                                <field name="closing_cash" />
                            </group>
                            <group>
                                <field name="total_cash" />
                                <field name="total_card" />
                                <field name="total_transfer" />
                                <field name="total_other" />
                                <field name="total_sales" />
                                <field name="difference" />
                            </group>
                        </group>
                        <field name="notes" />
                    </sheet>
                </form>
            </field>
        </record>

        <record id="action_skeen_corte_caja" model="ir.actions.act_window">
            <field name="name">Cortes de Caja</field>
            <field name="res_model">skeen.corte.caja</field>
            <field name="view_mode">tree,form</field>
        </record>
    </data>
</odoo>
