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

    <record id="crm_todo_opportunity_add" model="ir.ui.view">
        <field name="name">Opportunities - Tasks</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_case_form_view_oppor" />
        <field name="arch" type="xml">
            <data>
            <page string="Lead" position="before">
                <page string="Tasks">
                    <field name="task_ids" colspan="4" nolabel="1">
                        <tree editable="bottom" string="Tasks">
                            <field name="name"/>
                            <field name="user_id"/>

                            <field string="Timebox" name="timebox_id"/>
                            <button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open"/>
                            <button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open"/>

                            <field name="state"/>
                            <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
                            <button name="action_close" states="draft,pending,open" string="Done" type="object" icon="terp-dialog-close" help="For changing to done state"/>
                        </tree>
                    </field>
                </page>
            </page>
            </data>
        </field>
    </record>

    <record model="ir.ui.view" id="project_task_crm_tree">
        <field name="name">project.task.tree.crm</field>
        <field name="model">project.task</field>
        <field name="priority">20</field>
        <field name="inherit_id" ref="project.view_task_tree2" />
        <field name="arch" type="xml">
            <field name="remaining_hours" position="after">
                <field name="lead_id" invisible="not context.get('lead_id', False)"/>
            </field>
        </field>
    </record>


    <record model="ir.actions.act_window" id="crm_todo_action">
        <field name="name">My Tasks</field>
        <field name="res_model">project.task</field>
        <field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1, "lead_id": 1}</field>
        <field name="search_view_id" ref="project_gtd.view_task_gtd_search"/>
        <field name="domain">[('user_id','=',uid)]</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,calendar,gantt,graph,kanban</field>
    </record>
    <menuitem
        id="menu_crm_todo"
        parent="base.menu_sales"
        action="crm_todo_action"
        sequence="6"/>


    </data>
</openerp>
<commit_msg>[FIX] crm_todo: usability fix: the lead was not present in the task form view, but in the tree view, it is now present in both view when coming from 'my tasks' in crm menu.<commit_after><?xml version="1.0" ?>
<openerp>
    <data>

    <record id="crm_todo_opportunity_add" model="ir.ui.view">
        <field name="name">Opportunities - Tasks</field>
        <field name="model">crm.lead</field>
        <field name="inherit_id" ref="crm.crm_case_form_view_oppor" />
        <field name="arch" type="xml">
            <data>
            <page string="Lead" position="before">
                <page string="Tasks">
                    <field name="task_ids" colspan="4" nolabel="1">
                        <tree editable="bottom" string="Tasks">
                            <field name="name"/>
                            <field name="user_id"/>

                            <field string="Timebox" name="timebox_id"/>
                            <button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open"/>
                            <button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open"/>

                            <field name="state"/>
                            <button name="do_cancel" states="draft,open,pending" string="Cancel" type="object" icon="gtk-cancel" help="For cancelling the task"/>
                            <button name="action_close" states="draft,pending,open" string="Done" type="object" icon="terp-dialog-close" help="For changing to done state"/>
                        </tree>
                    </field>
                </page>
            </page>
            </data>
        </field>
    </record>

    <record model="ir.ui.view" id="project_task_crm_tree">
        <field name="name">project.task.tree.crm</field>
        <field name="model">project.task</field>
        <field name="priority">20</field>
        <field name="inherit_id" ref="project.view_task_tree2" />
        <field name="arch" type="xml">
            <field name="remaining_hours" position="after">
                <field name="lead_id" invisible="not context.get('lead_id', False)"/>
            </field>
        </field>
    </record>

    <record model="ir.ui.view" id="project_task_crm_form">
        <field name="name">project.task.form.crm</field>
        <field name="model">project.task</field>
        <field name="priority">20</field>
        <field name="inherit_id" ref="project.view_task_form2" />
        <field name="arch" type="xml">
            <field name="partner_id" position="after">
                <field name="lead_id" invisible="not context.get('lead_id', False)"/>
            </field>
        </field>
    </record>

    <record model="ir.actions.act_window" id="crm_todo_action">
        <field name="name">My Tasks</field>
        <field name="res_model">project.task</field>
        <field name="context">{'set_editable':True,'set_visible':True,'gtd':True,'user_invisible':True, "search_default_open": 1, "lead_id": 1}</field>
        <field name="search_view_id" ref="project_gtd.view_task_gtd_search"/>
        <field name="domain">[('user_id','=',uid)]</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,calendar,gantt,graph,kanban</field>
    </record>
    <menuitem
        id="menu_crm_todo"
        parent="base.menu_sales"
        action="crm_todo_action"
        sequence="6"/>


    </data>
</openerp>

{'fraction_non_alphanumeric': 0.16049968374446552, 'fraction_numerical': 0.0036369386464263124, 'mean_word_length': 2.3536585365853657, 'pattern_counts': {'":': 4, '<': 141, '<?xml version=': 2, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, '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': '7299002', 'n_tokens_mistral': 1936, 'n_tokens_neox': 1875, 'n_words': 333}