<?xml version="1.0"?>
<odoo>
    <record id="estate_property_offer_from_type_action" model="ir.actions.act_window">
        <field name="name">Offers</field>
        <field name="res_model">estate.property.offer</field>
        <field name="view_mode">tree,form</field>
    </record>

    <record id="estate_property_offer_tree_view" model="ir.ui.view">
        <field name="name">estate.property.offer.tree</field>
        <field name="model">estate.property.offer</field>
        <field name="arch" type="xml">
            <tree string="Offers" editable="top" decoration-success="state == 'accepted'" decoration-danger="state == 'refused'">
                <field name="price" />
                <field name="partner_id" />
                <field name="validity" />
                <field name="date_deadline" />
                <button name="action_accept" string="Accept" type="object" icon="fa-check" invisible="state" />
                <button name="action_reject" string="Reject" type="object" icon="fa-close" invisible="state" />
                <field name="state" invisible="True"/>
            </tree>
        </field>
    </record>

    <record id="estate_property_view_form" model="ir.ui.view">
        <field name="name">estate.property.offer.form</field>
        <field name="model">estate.property.offer</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <field name="price" />
                    <field name="partner_id" />
                    <field name="validity" />
                    <field name="date_deadline" />
                    <field name="state" />
                </sheet>
            </form>
        </field>
    </record>
</odoo>