<commit_before><openerp>
    <data>
        <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>

        <record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
            <field name="name">Time &amp; Materials to Invoice</field>
            <field name="res_model">account.analytic.line</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('invoice_id','=',False)]</field>
            <field name="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field>
            <field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
            <field name="help" type="html">
              <p>
                You will find here timesheets and purchases you did for
                contracts that can be reinvoiced to the customer.  If you want
                to record new activities to invoice, you should use the timesheet
                menu instead.
              </p>
            </field>
        </record>
        <menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/>

        <record id="view_account_analytic_account_overdue_search" model="ir.ui.view">
            <field name="name">account.analytic.account.search</field>
            <field name="model">account.analytic.account</field>
            <field name="arch" type="xml">
                <search string="Analytic Account">
                    <field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/>
                    <field name="date"/>
                    <filter icon="terp-camera_test" name="open" string="Open" domain="[('state','in',('open','draft'))]" help="Contracts in progress"/>
                    <filter icon="terp-gtk-media-pause" name="pending" string="Pending" domain="[('state','=','pending')]" help="Pending contracts to renew with your customer"/>
                    <filter icon="terp-go-today" string="To Renew" domain="['|', '&amp;', ('date', '!=', False), ('date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" name="renew"
                        help="The contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours" />
                    <separator/>
                    <filter string="Customer Contracts" help="A contract in OpenERP is an analytic account having a partner set on it." name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
                    <separator/>
                    <filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]" icon="terp-personal-" />
                    <field name="partner_id"/>
                    <field name="manager_id"/>
                    <group expand="0" string="Group By...">
                        <filter string="Status" domain="[]" context="{'group_by':'state'}"/>
                        <filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/>
                        <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
                        <filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/>
                        <filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" />
                        <filter string="End Date" domain="[]" context="{'group_by' : 'date'}" />
                    </group>
                </search>
            </field>
        </record>


        <record id="action_account_analytic_overdue" model="ir.actions.act_window">
            <field name="name">Contracts to Renew</field>
            <field name="res_model">account.analytic.account</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'search_default_manager_id':uid, 'search_default_pending':1, 'search_default_renew':1}</field>
            <field name="domain">[('type','=','contract')]</field>
            <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to define a new contract.
              </p><p>
                You will find here the contracts to be renewed because the
                end date is passed or the working effort is higher than the
                maximum authorized one.
              </p><p>
                OpenERP automatically sets contracts to be renewed in a pending
                state. After the negociation, the salesman should close or renew
                pending contracts.
              </p>
            </field>
        </record>
        <menuitem action="action_account_analytic_overdue" id="menu_action_account_analytic_overdue" sequence="50" parent="base.menu_invoiced"/>

        <record id="action_account_analytic_overdue_all" model="ir.actions.act_window">
            <field name="name">Contracts</field>
            <field name="res_model">account.analytic.account</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1, 'default_manager_id':uid}</field>
            <field name="domain">[('type','=','contract')]</field>
            <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
            <field name="help" type="html">
                <p class="oe_view_nocontent_create">
                    Click to create a new contract.
                </p><p>
                    Use contracts to follow tasks, issues, timesheets or invoicing based on
                    work done, expenses and/or sales orders. OpenERP will automatically manage
                    the alerts for the renewal of the contracts to the right salesperson.
                </p>
            </field>
        </record>
        <menuitem id="base.menu_sales" name="Sales"
            parent="base.menu_base_partner"
            sequence="1"/>
        <menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="7" parent="base.menu_sales"/>


    </data>
</openerp>
<commit_msg>Analytic accounts contract search view<commit_after><openerp>
    <data>
        <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/>

        <record id="action_hr_tree_invoiced_all" model="ir.actions.act_window">
            <field name="name">Time &amp; Materials to Invoice</field>
            <field name="res_model">account.analytic.line</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('invoice_id','=',False)]</field>
            <field name="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field>
            <field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
            <field name="help" type="html">
              <p>
                You will find here timesheets and purchases you did for
                contracts that can be reinvoiced to the customer.  If you want
                to record new activities to invoice, you should use the timesheet
                menu instead.
              </p>
            </field>
        </record>
        <menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/>

        <record id="view_account_analytic_account_overdue_search" model="ir.ui.view">
            <field name="name">account.analytic.account.search</field>
            <field name="model">account.analytic.account</field>
            <field name="arch" type="xml">
                <search string="Contracts">
                    <field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/>
                    <field name="date"/>
                    <field name="partner_id"/>
                    <field name="manager_id"/>
                    <field name="parent_id"/>
                    <filter name="open" string="Open" domain="[('state','in',('open','draft'))]" help="Contracts in progress"/>
                    <filter name="pending" string="Pending" domain="[('state','=','pending')]" help="Pending contracts to renew with your customer"/>
                    <filter string="To Renew" domain="['|', '&amp;', ('date', '!=', False), ('date', '&lt;=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" name="renew"
                        help="The contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours" />
                    <separator/>
                    <filter string="Customer Contracts" help="Contracts assigned to a customer." name="has_partner" domain="[('partner_id', '!=', False)]"/>
                    <filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]"/>
                    <separator/>
                    <group expand="0" string="Group By...">
                        <filter string="Status" domain="[]" context="{'group_by':'state'}"/>
                        <filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/>
                        <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
                        <filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/>
                        <filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" />
                        <filter string="End Date" domain="[]" context="{'group_by' : 'date'}" />
                    </group>
                </search>
            </field>
        </record>


        <record id="action_account_analytic_overdue" model="ir.actions.act_window">
            <field name="name">Contracts to Renew</field>
            <field name="res_model">account.analytic.account</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'search_default_manager_id':uid, 'search_default_pending':1, 'search_default_renew':1}</field>
            <field name="domain">[('type','=','contract')]</field>
            <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                Click to define a new contract.
              </p><p>
                You will find here the contracts to be renewed because the
                end date is passed or the working effort is higher than the
                maximum authorized one.
              </p><p>
                OpenERP automatically sets contracts to be renewed in a pending
                state. After the negociation, the salesman should close or renew
                pending contracts.
              </p>
            </field>
        </record>
        <menuitem action="action_account_analytic_overdue" id="menu_action_account_analytic_overdue" sequence="50" parent="base.menu_invoiced"/>

        <record id="action_account_analytic_overdue_all" model="ir.actions.act_window">
            <field name="name">Contracts</field>
            <field name="res_model">account.analytic.account</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1, 'default_manager_id':uid}</field>
            <field name="domain">[('type','=','contract')]</field>
            <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
            <field name="help" type="html">
                <p class="oe_view_nocontent_create">
                    Click to create a new contract.
                </p><p>
                    Use contracts to follow tasks, issues, timesheets or invoicing based on
                    work done, expenses and/or sales orders. OpenERP will automatically manage
                    the alerts for the renewal of the contracts to the right salesperson.
                </p>
            </field>
        </record>
        <menuitem id="base.menu_sales" name="Sales"
            parent="base.menu_base_partner"
            sequence="1"/>
        <menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="7" parent="base.menu_sales"/>


    </data>
</openerp>

{'fraction_non_alphanumeric': 0.14270353302611366, 'fraction_numerical': 0.0019969278033794163, 'mean_word_length': 2.4319978914074856, 'pattern_counts': {'":': 0, '<': 206, '<?xml version=': 0, '>': 206, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5831937', 'n_tokens_mistral': 3646, 'n_tokens_neox': 3436, 'n_words': 799}