<commit_before><?xml version='1.0' encoding='UTF-8' ?>
<openerp>
    <data noupdate="0">

        <!-- Membership State -->

        <!-- SEARCH -->
        <record id="membership_state_search_view" model="ir.ui.view">
            <field name="name">membership.state.search</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <search string="Membership State" version="7.0">
                    <field name="code" />
                    <field name="name" />
                </search>
            </field>
        </record>

        <record id="membership_state_tree_view" model="ir.ui.view">
            <field name="name">membership.state.tree</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <tree string="Membership State" version="7.0">
                    <field name="name" />
                    <field name="code" />
                </tree>
            </field>
        </record>

        <record id="membership_state_view" model="ir.ui.view">
            <field name="name">membership.state.form</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <form string="Membership State" version="7.0">
                    <header>
                        <span attrs="{'invisible': ['|',('id','=',False),('active','=',False)]}"
                             invisible="context.get('popup')"
                             groups="ficep_base.ficep_res_groups_configurator">
                            <button name="action_invalidate" string="Invalidate" type="object"
                                    confirm="Invalidate Membership State: proceed anyway?" />
                        </span>
                    </header>
                    <sheet>
                        <div class="oe_title" name="title">
                            <label for="name" class="oe_edit_only" />
                            <h1>
                                <field name="name" />
                            </h1>
                        </div>
                        <group>
                            <group>
                                <field name="code"
                                    attrs="{'readonly': [('id','!=',False)]}" />
                            </group>
                        </group>
                        <group name="state"
                            attrs="{'invisible': [('id','=',False)]}">
                            <group name="validity">
                                <field name="create_date" />
                                <field name="expire_date"
                                    attrs="{'invisible': [('active','=',True)]}" />
                            </group>
                        </group>
                    </sheet>
                    <div name="dev" class="oe_form_sheetbg"
                        groups="ficep_base.res_groups_developper">
                        <div class="oe_formview oe_form_sheet_width">
                            <h3>More Info</h3>
                            <div attrs="{'invisible': ['|',('id','=',False),('active','=',True)]}">
                                <button name="action_revalidate" string="Reactivate" type="object"
                                        confirm="Reactivate document: proceed anyway?" />
                            </div>
                            <group name="moreinfo">
                                <field name="id" />
                                <field name="active" />
                            </group>
                        </div>
                    </div>
                    <div name="chat" class="oe_chatter" invisible="context.get('popup')">
                        <field name="message_follower_ids" widget="mail_followers"
                            groups="ficep_base.ficep_res_groups_configurator" />
                        <field name="message_ids" widget="mail_thread" />
                    </div>
                </form>
            </field>
        </record>

        <!-- Action -->

        <record id="membership_state_action" model="ir.actions.act_window">
            <field name="name">Membership States</field>
            <field name="res_model">membership.state</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="membership_state_tree_view" />
            <field name="search_view_id" ref="membership_state_search_view" />
        </record>

        <!-- Membership Lines -->

        <!-- Search View -->
       <record id="membership_line_search_view" model="ir.ui.view">
            <field name="name">membership.membership_line.search (ficep_membership)</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <search string="">
                    <field name="partner"/>
                    <field name="int_instance_id"/>
                    <field name="membership_state_id"/>
                    <field name="membership_id"/>
                    <separator/>
                    <filter name="active" string="Active"
                        domain="[('active','=',True)]" help="Active Memberships" />
                    <filter name="expired" string="Expired"
                        context="{'invisible_expire_date': False}"
                        domain="[('active','=',False)]" help="Expired Memberships" />

                    <group expand="0" string="Group By..." name="group_by">
                        <filter string="Member" context="{'group_by': 'partner'}"/>
                        <filter string="Instance" context="{'group_by': 'int_instance_id'}"/>
                        <filter string="State" context="{'group_by': 'membership_state_id'}"/>
                        <filter string="Membership Type" context="{'group_by': 'membership_id'}"/>
                    </group>
               </search>
            </field>
        </record>

        <!-- Tree View -->
        <record id="membership_line_tree_view" model="ir.ui.view">
            <field name="name">membership.membership_line.tree</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <tree colors="gray:active==False;green:membership_state_id[0]==%(ficep_membership.member)d" string="Membership Lines"
                      create="0" delete="0" version="7.0">
                    <field name="partner"/>
                    <field name="int_instance_id"/>
                    <field name="membership_state_id"/>
                    <field name="membership_id" attrs="{'invisible': [('member_price','&lt;=',0.0)]}"/>
                    <field name="reference" />
                    <field name="date_from"/>
                    <field name="date_to"/>
                    <field name="active" invisible="1"/>
                    <field name="member_price" invisible="1"/>
                    <field name="expire_date" invisible="context.get('invisible_expire_date', True)" />
                </tree>
            </field>
        </record>

        <record id="membership_line_form_view" model="ir.ui.view">
            <field name="name">membership.membership_line.form</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <form string="Membership Line" version="7.0">
                    <header>
                        <span attrs="{'invisible': ['|',('id','=',False),('active','=',False)]}"
                             invisible="context.get('popup')"
                             groups="ficep_base.ficep_res_groups_configurator">
                        </span>
                    </header>
                    <sheet>
                        <div class="oe_title" name="title">
                            <label for="partner"/>
                            <h1><field name="partner" /></h1>
                        </div>
                        <div class="oe_right oe_button_box" name="buttons" invisible="context.get('popup')">
                        </div>

                        <group name="data">
                            <group name="main">
                                <field name="int_instance_id" />
                                <field name="membership_state_id" />
                                <field name="membership_id" widget="selection"
                                       attrs="{'invisible': [('membership_state_id','!=',%(ficep_membership.member)d)]}" />
                                <field name="member_price" attrs="{'invisible': [('membership_state_id','!=',%(ficep_membership.member)d)]}"/>
                                <field name="reference" />
                            </group>
                            <group name="other">
                                <field name="account_invoice_id" attrs="{'invisible': [('account_invoice_id','=',False)]}"
                                       groups="ficep_account.res_groups_financial_manager"/>
                                <field name="account_invoice_line" attrs="{'invisible': [('account_invoice_line','=',False)]}"
                                       groups="ficep_account.res_groups_financial_manager"/>
                            </group>
                        </group>

                        <group name="state" attrs="{'invisible': [('id','=',False)]}">
                            <group name="validity">
                                <field name="create_date" />
                                <field name="expire_date" attrs="{'invisible': [('active','=',True)]}" />
                            </group>
                            <group name="dates">
                                <field name="date"/>
                                <field name="date_from" />
                                <field name="date_to" attrs="{'invisible': [('date_to','=',False)]}" />
                            </group>
                        </group>

                    </sheet>
                    <div name="dev" class="oe_form_sheetbg" groups="ficep_base.res_groups_developper">
                        <div class="oe_formview oe_form_sheet_width">
                            <h3>More Info</h3>
                            <div attrs="{'invisible': ['|',('id','=',False),('active','=',True)]}">
                                <button name="action_revalidate" string="Reactivate" type="object"
                                        confirm="Reactivate document: proceed anyway?" />
                            </div>
                            <group name="moreinfo">
                                <field name="id"/>
                                <field name="active"/>
                                <field name="date_cancel"/>
                            </group>
                        </div>
                    </div><commit_msg>[CHG] avoid unauthorized modification [ADD] red color in tree<commit_after><?xml version='1.0' encoding='UTF-8' ?>
<openerp>
    <data noupdate="0">

        <!-- Membership State -->

        <!-- SEARCH -->
        <record id="membership_state_search_view" model="ir.ui.view">
            <field name="name">membership.state.search</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <search string="Membership State" version="7.0">
                    <field name="code" />
                    <field name="name" />
                </search>
            </field>
        </record>

        <record id="membership_state_tree_view" model="ir.ui.view">
            <field name="name">membership.state.tree</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <tree string="Membership State" version="7.0">
                    <field name="name" />
                    <field name="code" />
                </tree>
            </field>
        </record>

        <record id="membership_state_view" model="ir.ui.view">
            <field name="name">membership.state.form</field>
            <field name="model">membership.state</field>
            <field name="arch" type="xml">
                <form string="Membership State" version="7.0">
                    <header>
                        <span attrs="{'invisible': ['|',('id','=',False),('active','=',False)]}"
                             invisible="context.get('popup')"
                             groups="ficep_base.ficep_res_groups_configurator">
                            <button name="action_invalidate" string="Invalidate" type="object"
                                    confirm="Invalidate Membership State: proceed anyway?" />
                        </span>
                    </header>
                    <sheet>
                        <div class="oe_title" name="title">
                            <label for="name" class="oe_edit_only" />
                            <h1>
                                <field name="name" />
                            </h1>
                        </div>
                        <group>
                            <group>
                                <field name="code"
                                    attrs="{'readonly': [('id','!=',False)]}" />
                            </group>
                        </group>
                        <group name="state"
                            attrs="{'invisible': [('id','=',False)]}">
                            <group name="validity">
                                <field name="create_date" />
                                <field name="expire_date"
                                    attrs="{'invisible': [('active','=',True)]}" />
                            </group>
                        </group>
                    </sheet>
                    <div name="dev" class="oe_form_sheetbg"
                        groups="ficep_base.res_groups_developper">
                        <div class="oe_formview oe_form_sheet_width">
                            <h3>More Info</h3>
                            <div attrs="{'invisible': ['|',('id','=',False),('active','=',True)]}">
                                <button name="action_revalidate" string="Reactivate" type="object"
                                        confirm="Reactivate document: proceed anyway?" />
                            </div>
                            <group name="moreinfo">
                                <field name="id" />
                                <field name="active" />
                            </group>
                        </div>
                    </div>
                    <div name="chat" class="oe_chatter" invisible="context.get('popup')">
                        <field name="message_follower_ids" widget="mail_followers"
                            groups="ficep_base.ficep_res_groups_configurator" />
                        <field name="message_ids" widget="mail_thread" />
                    </div>
                </form>
            </field>
        </record>

        <!-- Action -->

        <record id="membership_state_action" model="ir.actions.act_window">
            <field name="name">Membership States</field>
            <field name="res_model">membership.state</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="view_id" ref="membership_state_tree_view" />
            <field name="search_view_id" ref="membership_state_search_view" />
        </record>

        <!-- Membership Lines -->

       <!-- Search View -->
       <record id="membership_line_search_view" model="ir.ui.view">
            <field name="name">membership.membership_line.search (ficep_membership)</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <search string="">
                    <field name="partner"/>
                    <field name="int_instance_id"/>
                    <field name="membership_state_id"/>
                    <field name="membership_id"/>
                    <separator/>
                    <filter name="active" string="Active"
                        domain="[('active','=',True)]" help="Active Memberships" />
                    <filter name="expired" string="Expired"
                        context="{'invisible_expire_date': False}"
                        domain="[('active','=',False)]" help="Expired Memberships" />

                    <group expand="0" string="Group By..." name="group_by">
                        <filter string="Member" context="{'group_by': 'partner'}"/>
                        <filter string="Instance" context="{'group_by': 'int_instance_id'}"/>
                        <filter string="State" context="{'group_by': 'membership_state_id'}"/>
                        <filter string="Membership Type" context="{'group_by': 'membership_id'}"/>
                    </group>
               </search>
            </field>
        </record>

        <!-- Tree View -->
        <record id="membership_line_tree_view" model="ir.ui.view">
            <field name="name">membership.membership_line.tree</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <tree colors="gray:active==False;green:membership_state_id[0]==%(ficep_membership.member)d;red:membership_state_id[0] in [%(ficep_membership.former_supporter)d, %(ficep_membership.refused_member_candidate)d, %(ficep_membership.expulsion_former_member)d, %(ficep_membership.resignation_former_member)d, %(ficep_membership.inappropriate_former_member)d, %(ficep_membership.break_former_member)d]"
                      string="Membership Lines" create="0" delete="0" version="7.0">
                    <field name="partner"/>
                    <field name="int_instance_id"/>
                    <field name="membership_state_id"/>
                    <field name="membership_id" attrs="{'invisible': [('membership_id','=',False)]}"/>
                    <field name="reference" />
                    <field name="date_from"/>
                    <field name="date_to"/>
                    <field name="active" invisible="1"/>
                    <field name="member_price" invisible="1"/>
                    <field name="expire_date" invisible="context.get('invisible_expire_date', True)" />
                </tree>
            </field>
        </record>

        <record id="membership_line_form_view" model="ir.ui.view">
            <field name="name">membership.membership_line.form</field>
            <field name="model">membership.membership_line</field>
            <field name="arch" type="xml">
                <form string="Membership Line" create="0" delete="0" version="7.0">
                    <header>
                        <span attrs="{'invisible': ['|',('id','=',False),('active','=',False)]}"
                             invisible="context.get('popup')"
                             groups="ficep_base.ficep_res_groups_configurator">
                        </span>
                    </header>
                    <sheet>
                        <div class="oe_title" name="title">
                            <label for="partner"/>
                            <h1><field name="partner" readonly="not context.get('is_developper')" /></h1>
                        </div>
                        <div class="oe_right oe_button_box" name="buttons" invisible="context.get('popup')">
                        </div>

                        <group name="data">
                            <group name="main">
                                <field name="membership_state_id" readonly="not context.get('is_developper')" />
                                <field name="membership_id" readonly="not context.get('is_developper')"
                                       attrs="{'invisible': [('membership_id','=',False)]}" />
                                <field name="member_price" readonly="not context.get('in_ficep_configurator')"
                                       attrs="{'invisible': [('membership_id','=',False)]}" />
                                <field name="reference" readonly="not context.get('is_developper')"
                                       attrs="{'invisible': [('reference','=',False)]}" />
                            </group>
                            <group name="other">
                                <field name="int_instance_id" readonly="not context.get('is_developper')" />
                                <field name="account_invoice_id" attrs="{'invisible': [('account_invoice_id','=',False)]}"
                                       groups="ficep_account.res_groups_financial_manager"/>
                                <field name="account_invoice_line" attrs="{'invisible': [('account_invoice_line','=',False)]}"
                                       groups="ficep_account.res_groups_financial_manager"/>
                            </group>
                        </group>

                        <group name="state" attrs="{'invisible': [('id','=',False)]}">
                            <group name="validity">
                                <field name="create_date" />
                                <field name="expire_date" attrs="{'invisible': [('active','=',True)]}" />
                            </group>
                            <group name="dates">
                                <field name="date" readonly="not context.get('is_developper')"/>
                                <field name="date_from" />
                                <field name="date_to" attrs="{'invisible': [('date_to','=',False)]}" />
                            </group>
                        </group>

                    </sheet>
                    <div name="dev" class="oe_form_sheetbg" groups="ficep_base.res_groups_developper">
                        <div class="oe_formview oe_form_sheet_width">
                            <h3>More Info</h3>
                            <div attrs="{'invisible': ['|',('id','=',False),('active','=',True)]}">
                                <button name="action_revalidate" string="Reactivate" type="object"
                                        confirm="Reactivate document: proceed anyway?" />
                            </div>
                            <group name="moreinfo">
                                <field name="id"/>
                                <field name="active"/>
                                <field name="date_cancel"/>
                            </group>
                        </div>
                    </div>
{'fraction_non_alphanumeric': 0.1444531727328271, 'fraction_numerical': 0.0026621279567076894, 'mean_word_length': 1.3139452691103706, 'pattern_counts': {'":': 0, '<': 399, '<?xml version=': 2, '>': 399, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 18, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6798067', 'n_tokens_mistral': 5807, 'n_tokens_neox': 5568, 'n_words': 883}