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

        <record id="hr_timesheet_line_tree" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.tree</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <tree editable="top" string="Timesheet Activities">                  
                    <field name="date" on_change="on_change_date(date)"/>
                    <field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
                    <field name="name"/>
                    <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
                    <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
                    <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
                    <field name="journal_id" invisible="1"/>
                    <field name="amount" sum="Total cost" invisible="1"/>
                    <field name="general_account_id" invisible="1"/>
                    <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
                </tree>
            </field>
        </record>
        <record id="hr_timesheet_line_form" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.form</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <form string="Timesheet Activities" version="7.0">
                    <sheet>
                    <group>
                        <group>
                            <field name="name"/>
                            <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
                        </group>
                        <group>
                            <field name="date" on_change="on_change_date(date)"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Information">
                        <group>
                            <group string="Product">
                                <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
                                <label string="Duration" for="unit_amount"/>
                                <div>
                                    <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
                                    <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
                                </div>
                            </group>
                            <group string="Accounting">
                                <field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
                                <field name="amount"/>
                                <field name="general_account_id"/>
                                <field name="journal_id"/>
                            </group>
                        </group>
                        </page>
                    </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="hr_timesheet_line_search" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.search</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <search string="Timesheet">
                    <field name="date"/>
                    <field name="user_id"/>
                    <field name="account_id"/>
                    <group expand="0" string="Group By...">
                        <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
                        <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record model="ir.actions.act_window" id="act_analytic_cost_revenue">
            <field name="context">{'search_default_account_id': [active_id], 'default_account_id': active_id, 'search_default_group_date': 1, 'search_default_group_journal': 1}</field>
            <field name="name">Costs &amp; Revenues</field>
            <field name="res_model">account.analytic.line</field>
            <field name="src_model">account.analytic.account</field>
            <field name="view_mode">tree,form</field>
            <field name="view_type">form</field>
            <field name="help" type="html">
              <p>
                No activity yet on this contract.
              </p><p>
                In OpenERP, contracts and projects are implemented using
                analytic account. So, you can track costs and revenues to analyse
                your margins easily.
              </p><p>
                Costs will be created automatically when you register supplier
                invoices, expenses or timesheets.
              </p><p><commit_msg>[FIX]: analytic_account: Analytic account of type view does not aggregate costs and revenues (Case: ref 593243)<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <record id="hr_timesheet_line_tree" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.tree</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <tree editable="top" string="Timesheet Activities">                  
                    <field name="date" on_change="on_change_date(date)"/>
                    <field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
                    <field name="name"/>
                    <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
                    <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
                    <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
                    <field name="journal_id" invisible="1"/>
                    <field name="amount" sum="Total cost" invisible="1"/>
                    <field name="general_account_id" invisible="1"/>
                    <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
                </tree>
            </field>
        </record>
        <record id="hr_timesheet_line_form" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.form</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <form string="Timesheet Activities" version="7.0">
                    <sheet>
                    <group>
                        <group>
                            <field name="name"/>
                            <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
                        </group>
                        <group>
                            <field name="date" on_change="on_change_date(date)"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Information">
                        <group>
                            <group string="Product">
                                <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
                                <label string="Duration" for="unit_amount"/>
                                <div>
                                    <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
                                    <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
                                </div>
                            </group>
                            <group string="Accounting">
                                <field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
                                <field name="amount"/>
                                <field name="general_account_id"/>
                                <field name="journal_id"/>
                            </group>
                        </group>
                        </page>
                    </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="hr_timesheet_line_search" model="ir.ui.view">
            <field name="name">hr.analytic.timesheet.search</field>
            <field name="model">hr.analytic.timesheet</field>
            <field name="arch" type="xml">
                <search string="Timesheet">
                    <field name="date"/>
                    <field name="user_id"/>
                    <field name="account_id"/>
                    <group expand="0" string="Group By...">
                        <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
                        <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
                        <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
                        <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
                    </group>
                </search>
            </field>
        </record>

        <record model="ir.actions.act_window" id="act_analytic_cost_revenue">
            <field name="context">{'search_default_group_date': 1, 'search_default_group_journal': 1}</field>
            <field name="domain">[('account_id','child_of', active_id)]</field>
            <field name="name">Costs &amp; Revenues</field>
            <field name="res_model">account.analytic.line</field>
            <field name="src_model">account.analytic.account</field>
            <field name="view_mode">tree,form</field>
            <field name="view_type">form</field>
            <field name="help" type="html">
              <p>
                No activity yet on this contract.
              </p><p>
                In OpenERP, contracts and projects are implemented using
                analytic account. So, you can track costs and revenues to analyse
                your margins easily.
              </p><p>
                Costs will be created automatically when you register supplier
                invoices, expenses or timesheets.
              </p><p>
{'fraction_non_alphanumeric': 0.143512826817474, 'fraction_numerical': 0.003770182771903942, 'mean_word_length': 1.7845732542218165, 'pattern_counts': {'":': 2, '<': 213, '<?xml version=': 2, '>': 213, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '660722', 'n_tokens_mistral': 3341, 'n_tokens_neox': 3141, 'n_words': 577}