<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- Expenses -->

        <record id="view_expenses_line_tree" model="ir.ui.view">
            <field name="name">hr.expense.line.tree</field>
            <field name="type">tree</field>
            <field name="model">hr.expense.line</field>
            <field name="arch" type="xml">
                <tree string="Expense Lines">
                    <field name="sequence" invisible="1"/>
                    <field name="date_value"/>
                    <field name="name"/>
                    <field name="ref"/>
                    <field domain="[('type','=','normal'), ('parent_id','!=',False)]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
                    <field name="unit_amount"/>
                    <field name="unit_quantity"/>
                    <field name="total_amount" sum="Total"/>
                </tree>
            </field>
        </record>

        <record id="view_expenses_tree" model="ir.ui.view">
            <field name="name">hr.expense.expense.tree</field>
            <field name="model">hr.expense.expense</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Expenses" colors="blue:state=='draft'">
                    <field name="employee_id"/>
                    <field name="date"/>
                    <field name="user_id" invisible="1"/>
                    <field name="name"/>
                    <field name="currency_id"/>
                    <field name="amount"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="view_editable_expenses_tree" model="ir.ui.view">
            <field name="name">hr.expense.expense.tree</field>
            <field name="model">hr.expense.expense</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="blue:state == 'draft';black:state in ('confirm','accepted','invoiced','paid');gray:state == 'cancelled'"  string="Expenses" editable="top">
                    <field name="employee_id"/>
                    <field name="date"/>
                    <field name="department_id"/>
                    <field name="ref"/>
                    <field name="name"/>
                    <field name="amount"/>
                    <field name="state"/>
                    <button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
                    <button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
                </tree>
            </field>
        </record>

        <record id="view_expenses_form" model="ir.ui.view">
            <field name="name">hr.expense.form</field>
            <field name="type">form</field>
            <field name="model">hr.expense.expense</field>
            <field name="arch" type="xml">
                <form string="Expenses Sheet" version="7.0">
                <header>
                    <button name="confirm" states="draft" string="Submit to Manager" type="workflow"/>
                    <button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user"/>
                    <button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user"/>
                    <button name="invoice" states="accepted" string="Invoice" type="object" groups="base.group_hr_user"/>
                    <button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" groups="base.group_hr_user" />
                    <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
                </header>
                <sheet>
                    <group col="4">
                        <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
                        <field name="name"/>
                        <field name="ref"/>
                        <field name="date"/>
                        <field name="currency_id"/>
                        <field name="department_id"/>
                        <field name="company_id" groups="base.group_multi_company"/>
                    </group><commit_msg>[IMP] hr_expanse: improved color of button based on business flow<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- Expenses -->

        <record id="view_expenses_line_tree" model="ir.ui.view">
            <field name="name">hr.expense.line.tree</field>
            <field name="type">tree</field>
            <field name="model">hr.expense.line</field>
            <field name="arch" type="xml">
                <tree string="Expense Lines">
                    <field name="sequence" invisible="1"/>
                    <field name="date_value"/>
                    <field name="name"/>
                    <field name="ref"/>
                    <field domain="[('type','=','normal'), ('parent_id','!=',False)]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
                    <field name="unit_amount"/>
                    <field name="unit_quantity"/>
                    <field name="total_amount" sum="Total"/>
                </tree>
            </field>
        </record>

        <record id="view_expenses_tree" model="ir.ui.view">
            <field name="name">hr.expense.expense.tree</field>
            <field name="model">hr.expense.expense</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Expenses" colors="blue:state=='draft'">
                    <field name="employee_id"/>
                    <field name="date"/>
                    <field name="user_id" invisible="1"/>
                    <field name="name"/>
                    <field name="currency_id"/>
                    <field name="amount"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="view_editable_expenses_tree" model="ir.ui.view">
            <field name="name">hr.expense.expense.tree</field>
            <field name="model">hr.expense.expense</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree colors="blue:state == 'draft';black:state in ('confirm','accepted','invoiced','paid');gray:state == 'cancelled'"  string="Expenses" editable="top">
                    <field name="employee_id"/>
                    <field name="date"/>
                    <field name="department_id"/>
                    <field name="ref"/>
                    <field name="name"/>
                    <field name="amount"/>
                    <field name="state"/>
                    <button name="confirm" states="draft" string="Confirm" type="workflow" icon="gtk-apply"/>
                    <button name="refuse" states="confirm,draft,accepted" string="Refuse" type="workflow" icon="gtk-no" groups="base.group_hr_user"/>
                </tree>
            </field>
        </record>

        <record id="view_expenses_form" model="ir.ui.view">
            <field name="name">hr.expense.form</field>
            <field name="type">form</field>
            <field name="model">hr.expense.expense</field>
            <field name="arch" type="xml">
                <form string="Expenses Sheet" version="7.0">
                <header>
                    <button name="confirm" states="draft" string="Submit to Manager" type="workflow" class="oe_form_button_active_flow"/>
                    <button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_form_button_active_flow"/>
                    <button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" class="oe_form_button_return_flow"/>
                    <button name="invoice" states="accepted" string="Invoice" type="object" groups="base.group_hr_user" class="oe_form_button_active_flow"/>
                    <button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" groups="base.group_hr_user" />
                    <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
                </header>
                <sheet>
                    <group col="4">
                        <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
                        <field name="name"/>
                        <field name="ref"/>
                        <field name="date"/>
                        <field name="currency_id"/>
                        <field name="department_id"/>
                        <field name="company_id" groups="base.group_multi_company"/>
                    </group>
{'fraction_non_alphanumeric': 0.15740333919156416, 'fraction_numerical': 0.0017574692442882249, 'mean_word_length': 1.8668136020151134, 'pattern_counts': {'":': 4, '<': 185, '<?xml version=': 2, '>': 185, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5155260', 'n_tokens_mistral': 2500, 'n_tokens_neox': 2348, 'n_words': 420}