<commit_before><?xml version="1.0"?>
<openerp>
<data>

    <!-- Stage Search view -->
    <record id="crm_lead_stage_search" model="ir.ui.view">
        <field name="name">Stage - Search</field>
        <field name="model">crm.case.stage</field>
        <field name="type">search</field>
        <field name="arch" type="xml">
            <search string="Stage Search">
                <field name="name"/>
            </search>
        </field>
    </record>

    <!--Lead Stage Form view -->
    <record id="crm_lead_stage_act" model="ir.actions.act_window">
        <field name="name">Stages</field>
        <field name="res_model">crm.case.stage</field>
        <field name="view_type">form</field>
        <field name="view_id" ref="crm.crm_case_stage_tree"/>
        <field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
    </record>

     <menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act" name="Stages"
        sequence="0"
        parent="base.menu_crm_config_lead" />


        <!-- Lead/Opportunity Categories Action -->

        <record id="crm_lead_categ_action" model="ir.actions.act_window">
            <field name="name">Categories</field>
            <field name="res_model">crm.case.categ</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="crm_case_categ_tree-view"/>
            <field name="context" eval="{'object_id': ref('model_crm_lead')}"/>
            <field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
            <field name="help">Create specific categories that fit your company's activities to better classify and analyse your leads and opportunities. Such categories could for instance reflect your product structure or the different types of sales you do.</field>
        </record>

        <menuitem action="crm_lead_categ_action"
            id="menu_crm_lead_categ" name="Categories"
            parent="base.menu_crm_config_lead" sequence="1" groups="base.group_no_one"/>


        <!-- CRM Lead Form View  -->
        <record model="ir.ui.view" id="crm_case_form_view_leads">
        <field name="name">CRM - Leads Form</field>
        <field name="model">crm.lead</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Leads Form" layout="manual">
                <div class="oe_form_topbar">
                    <button name="%(crm.action_crm_lead2opportunity_partner)d" type="action"
                            string="Convert to Opportunity" help="Convert to Opportunity" icon="gtk-go-forward"/>
                    <button name="case_cancel" string="Cancel" type="object"
                            states="draft,open,pending" icon="gtk-cancel"/>
                    <div class="oe_clear"/>
                </div>
                <sheet layout="auto">
                <group colspan="4" col="7">
                    <field name="name" required="1" string="Subject"/>
                    <field name="priority"/>
                    <field name="categ_id"
                        widget="selection"
                        domain="[('object_id.model','=','crm.lead')]"/>
                    <newline />
                    <field name="user_id" />
                    <field name="section_id" widget="selection" />
                    <field name="type" invisible="1"/>
                </group>
                <notebook colspan="4">
                <page string="Lead">
                    <group colspan="4" col="2">
                        <field name="partner_name" string="Company Name" />
                    </group>
                    <group colspan="2" col="4">
                        <separator string="Contact" colspan="4" col="4"/>
                        <field name="contact_name" colspan="4"/>
                        <newline/>
                        <field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
                        <field name="function" />
                        <field name="street" colspan="4"/>
                        <field name="street2" colspan="4"/>
                        <field name="zip"/>
                        <field name="city"/>
                        <field name="country_id"/>
                        <field name="state_id"/>
                    </group>
                    <group colspan="2" col="3">
                        <separator string="Communication" colspan="4" col="3"/>
                        <field name="email_from" widget="email"/>
                        <button string="Mail"
                            name="%(mail.action_email_compose_message_wizard)d"
                            icon="terp-mail-message-new" type="action" colspan="1"/>
                        <newline/>
                        <field name="phone"/>
                        <newline/>
                        <field name="fax"/>
                        <newline/>
                        <field name="mobile"/>
                        <newline/>
                        <separator string="Links" colspan="4" col="3"/>
                        <field name="partner_id" string="Customer"/>
                        <button
                            name="%(action_crm_lead2partner)d"
                            icon="terp-partner" type="action"
                            string="Create"
                            attrs="{'invisible':[('partner_id','!=',False)]}"/>
                    </group>
                    <separator colspan="4" string="Notes"/>
                    <field name="description" nolabel="1" colspan="4"/>
                 </page>
                 <page string="Extra Info">
                    <group colspan="2" col="2">
                        <separator string="Categorization" colspan="2" col="2"/>
                        <field name="company_id"
                            groups="base.group_multi_company"
                            widget="selection" colspan="2" />
                        <field name="type_id" select="1" widget="selection"/>
                        <field name="channel_id" select="1" widget="selection"/>
                        <field name="referred"/>
                        <field name="state" groups="base.group_no_one"/>
                    </group>
                    <group colspan="2" col="2">
                        <separator string="Mailings" colspan="2" col="2"/>
                        <field name="opt_in" on_change="on_change_opt_in(opt_in)"/>
                        <field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
                    </group>
                    <group colspan="2" col="2" groups="base.group_no_one">
                        <separator string="Statistics" colspan="2" col="2"/>
                        <field name="day_open"/>
                        <field name="day_close"/>
                    </group>
                 </page>
                </notebook>
                </sheet>
                <div class="oe_form_bottom">
                    <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
                </div>
            </form>
        </field>
    </record>

    <!-- CRM Lead Tree View -->

    <record model="ir.ui.view" id="crm_case_tree_view_leads">
        <field name="name">Leads</field>
        <field name="model">crm.lead</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Leads" fonts="bold:needaction_pending==True" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
                <field name="needaction_pending" invisible="1"/>
                <field name="date_deadline" invisible="1"/>
                <field name="create_date" groups="base.group_no_one"/>
                <field name="name" string="Subject"/>
                <field name="contact_name"/>
                <field name="country_id" invisible="context.get('invisible_country', True)" />
                <field name="email_from"/>
                <field name="phone"/>

                <field name="categ_id" invisible="1"/>
                <field name="type_id" invisible="1"/>
                <field name="referred" invisible="1"/>
                <field name="channel_id" invisible="1"/><commit_msg>[CLEAN] crm_lead_view: cleaned indentation.<commit_after><?xml version="1.0"?>
<openerp>
    <data>

        <!-- Stage Search view -->
        <record id="crm_lead_stage_search" model="ir.ui.view">
            <field name="name">Stage - Search</field>
            <field name="model">crm.case.stage</field>
            <field name="type">search</field>
            <field name="arch" type="xml">
                <search string="Stage Search">
                    <field name="name"/>
                </search>
            </field>
        </record>

        <!--Lead Stage Form view -->
        <record id="crm_lead_stage_act" model="ir.actions.act_window">
            <field name="name">Stages</field>
            <field name="res_model">crm.case.stage</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="crm.crm_case_stage_tree"/>
            <field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
        </record>

        <menuitem action="crm_lead_stage_act" id="menu_crm_lead_stage_act" name="Stages" sequence="0" parent="base.menu_crm_config_lead" />


        <!-- Lead/Opportunity Categories Action -->

        <record id="crm_lead_categ_action" model="ir.actions.act_window">
            <field name="name">Categories</field>
            <field name="res_model">crm.case.categ</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="crm_case_categ_tree-view"/>
            <field name="context" eval="{'object_id': ref('model_crm_lead')}"/>
            <field name="domain">[('object_id.model', '=', 'crm.lead')]</field>
            <field name="help">Create specific categories that fit your company's activities to better classify and analyse your leads and opportunities. Such categories could for instance reflect your product structure or the different types of sales you do.</field>
        </record>

        <menuitem action="crm_lead_categ_action"
            id="menu_crm_lead_categ" name="Categories"
            parent="base.menu_crm_config_lead" sequence="1" groups="base.group_no_one"/>


        <!-- CRM Lead Form View  -->
        <record model="ir.ui.view" id="crm_case_form_view_leads">
        <field name="name">CRM - Leads Form</field>
        <field name="model">crm.lead</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Leads Form" layout="manual">
                <div class="oe_form_topbar">
                    <button name="%(crm.action_crm_lead2opportunity_partner)d" type="action"
                            string="Convert to Opportunity" help="Convert to Opportunity" icon="gtk-go-forward"/>
                    <button name="case_cancel" string="Cancel" type="object"
                            states="draft,open,pending" icon="gtk-cancel"/>
                    <div class="oe_clear"/>
                </div>
                <sheet layout="auto">
                <group colspan="4" col="7">
                    <field name="name" required="1" string="Subject"/>
                    <field name="priority"/>
                    <field name="categ_id"
                        widget="selection"
                        domain="[('object_id.model','=','crm.lead')]"/>
                    <newline />
                    <field name="user_id" />
                    <field name="section_id" widget="selection" />
                    <field name="type" invisible="1"/>
                </group>
                <notebook colspan="4">
                <page string="Lead">
                    <group colspan="4" col="2">
                        <field name="partner_name" string="Company Name" />
                    </group>
                    <group colspan="2" col="4">
                        <separator string="Contact" colspan="4" col="4"/>
                        <field name="contact_name" colspan="4"/>
                        <newline/>
                        <field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
                        <field name="function" />
                        <field name="street" colspan="4"/>
                        <field name="street2" colspan="4"/>
                        <field name="zip"/>
                        <field name="city"/>
                        <field name="country_id"/>
                        <field name="state_id"/>
                    </group>
                    <group colspan="2" col="3">
                        <separator string="Communication" colspan="4" col="3"/>
                        <field name="email_from" widget="email"/>
                        <button string="Mail"
                            name="%(mail.action_email_compose_message_wizard)d"
                            icon="terp-mail-message-new" type="action" colspan="1"/>
                        <newline/>
                        <field name="phone"/>
                        <newline/>
                        <field name="fax"/>
                        <newline/>
                        <field name="mobile"/>
                        <newline/>
                        <separator string="Links" colspan="4" col="3"/>
                        <field name="partner_id" string="Customer"/>
                        <button
                            name="%(action_crm_lead2partner)d"
                            icon="terp-partner" type="action"
                            string="Create"
                            attrs="{'invisible':[('partner_id','!=',False)]}"/>
                    </group>
                    <separator colspan="4" string="Notes"/>
                    <field name="description" nolabel="1" colspan="4"/>
                 </page>
                 <page string="Extra Info">
                    <group colspan="2" col="2">
                        <separator string="Categorization" colspan="2" col="2"/>
                        <field name="company_id"
                            groups="base.group_multi_company"
                            widget="selection" colspan="2" />
                        <field name="type_id" select="1" widget="selection"/>
                        <field name="channel_id" select="1" widget="selection"/>
                        <field name="referred"/>
                        <field name="state" groups="base.group_no_one"/>
                    </group>
                    <group colspan="2" col="2">
                        <separator string="Mailings" colspan="2" col="2"/>
                        <field name="opt_in" on_change="on_change_opt_in(opt_in)"/>
                        <field name="opt_out" on_change="on_change_opt_out(opt_out)"/>
                    </group>
                    <group colspan="2" col="2" groups="base.group_no_one">
                        <separator string="Statistics" colspan="2" col="2"/>
                        <field name="day_open"/>
                        <field name="day_close"/>
                    </group>
                 </page>
                </notebook>
                </sheet>
                <div class="oe_form_bottom">
                    <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
                </div>
            </form>
        </field>
        </record>

    <!-- CRM Lead Tree View -->
    <record model="ir.ui.view" id="crm_case_tree_view_leads">
        <field name="name">Leads</field>
        <field name="model">crm.lead</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Leads" fonts="bold:needaction_pending==True" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
                <field name="needaction_pending" invisible="1"/>
                <field name="date_deadline" invisible="1"/>
                <field name="create_date" groups="base.group_no_one"/>
                <field name="name" string="Subject"/>
                <field name="contact_name"/>
                <field name="country_id" invisible="context.get('invisible_country', True)" />
                <field name="email_from"/>
                <field name="phone"/>

                <field name="categ_id" invisible="1"/>
                <field name="type_id" invisible="1"/>
                <field name="referred" invisible="1"/>
                <field name="channel_id" invisible="1"/>
{'fraction_non_alphanumeric': 0.1427731388921557, 'fraction_numerical': 0.006350699753028343, 'mean_word_length': 1.6064367816091953, 'pattern_counts': {'":': 0, '<': 317, '<?xml version=': 2, '>': 317, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '5872233', 'n_tokens_mistral': 4613, 'n_tokens_neox': 4269, 'n_words': 882}