<?xml version="1.0" ?>
<!--
    Copyright 2017-19 Tecnativa - David Vidal
    Copyright 2021 Moka Tourisme (https://www.mokatourisme.fr)
    License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
    <record id="view_event_session_form" model="ir.ui.view">
        <field name="model">event.session</field>
        <field name="inherit_id" ref="event_session.view_event_session_form" />
        <field name="priority">20</field>
        <field name="arch" type="xml">
            <div name="button_box" position="inside">
                <field name="currency_id" invisible="1" />
                <button
                    name="action_view_linked_orders"
                    type="object"
                    class="oe_stat_button"
                    icon="fa-dollar"
                    groups="sales_team.group_sale_salesman"
                    help="Total sales for this session"
                    attrs="{'invisible': ['|', ('sale_price_subtotal', '=', 0), ('sale_price_subtotal', '=', False)]}"
                >
                    <field
                        string="Sales"
                        name="sale_price_subtotal"
                        widget="statinfo"
                    />
                </button>
            </div>
        </field>
    </record>
</odoo>
