<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_currency_rate_search" model="ir.ui.view">
            <field name="name">res.currency.rate.search</field>
            <field name="model">res.currency.rate</field>
            <field name="arch" type="xml">
                <search string="Currency Rates">
                    <field name="name" string="Date"/>
                </search>
            </field>
        </record>

        <record id="view_currency_rate_tree" model="ir.ui.view">
            <field name="name">res.currency.rate.tree</field>
            <field name="model">res.currency.rate</field>
            <field name="arch" type="xml">
                <tree string="Currency Rates">
                    <field name="name"/>
                    <field name="rate"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                </tree>
            </field>
        </record>

        <act_window
           id="act_view_currency_rates"
           name="Currency Rates"
           view_mode='tree,form'
           view_id='view_currency_rate_tree'
           domain="[('currency_id','=', active_id)]"
           context="{'default_currency_id': active_id}"
           res_model="res.currency.rate"/>

        <record id="view_currency_search" model="ir.ui.view">
            <field name="name">res.currency.search</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <search string="Currencies">
                    <field name="name" string="Currency"/>
                    <field name="active"/>
                    <filter name="active" string="Active" domain="[('active','=',True)]" help="Show active currencies"/>
                    <filter name="inactive" string="Inactive" domain="[('active','=',False)]" help="Show inactive currencies"/>
                </search>
            </field>
        </record>

        <record id="view_currency_tree" model="ir.ui.view">
            <field name="name">res.currency.tree</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <tree string="Currencies" decoration-muted="(not active)">
                    <field name="name"/>
                    <field name="symbol"/>
                    <field name="rate_ids" invisible="1"/>
                    <field name="date"/>
                    <field name="rate"/>
                    <field name="active"/>
                </tree>
            </field>
        </record>

        <record id="view_currency_form" model="ir.ui.view">
            <field name="name">res.currency.form</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <form string="Currency">
                    <header>
                        <button name="%(act_view_currency_rates)d" string="View Rates" type="action"/>
                    </header>
                    <sheet>
                        <group col="4">
                            <field name="name"/>
                            <field name="rate"/>
                            <field name="active"/>
                        </group>

                        <group groups="base.group_no_one">
                            <group string="Price Accuracy">
                                <field name="rounding"/>
                                <field name="decimal_places"/>
                            </group>

                            <group string="Display">
                                <field name="symbol"/>
                                <field name="position"/>
                            </group>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
        <record id="action_currency_form" model="ir.actions.act_window">
            <field name="name">Currencies</field>
            <field name="res_model">res.currency</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="view_currency_search"/>
            <field name="context">{'active_test': False}</field>
        </record>

        <menuitem action="action_currency_form" id="menu_action_currency_form" parent="menu_localisation" sequence="3" groups="base.group_multi_currency"/>

    </data>
</openerp>
<commit_msg>[IMP] base, usability: hide the 'View Rates' button on unactive currencies<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="view_currency_rate_search" model="ir.ui.view">
            <field name="name">res.currency.rate.search</field>
            <field name="model">res.currency.rate</field>
            <field name="arch" type="xml">
                <search string="Currency Rates">
                    <field name="name" string="Date"/>
                </search>
            </field>
        </record>

        <record id="view_currency_rate_tree" model="ir.ui.view">
            <field name="name">res.currency.rate.tree</field>
            <field name="model">res.currency.rate</field>
            <field name="arch" type="xml">
                <tree string="Currency Rates">
                    <field name="name"/>
                    <field name="rate"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                </tree>
            </field>
        </record>

        <act_window
           id="act_view_currency_rates"
           name="Currency Rates"
           view_mode='tree,form'
           view_id='view_currency_rate_tree'
           domain="[('currency_id','=', active_id)]"
           context="{'default_currency_id': active_id}"
           res_model="res.currency.rate"/>

        <record id="view_currency_search" model="ir.ui.view">
            <field name="name">res.currency.search</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <search string="Currencies">
                    <field name="name" string="Currency"/>
                    <field name="active"/>
                    <filter name="active" string="Active" domain="[('active','=',True)]" help="Show active currencies"/>
                    <filter name="inactive" string="Inactive" domain="[('active','=',False)]" help="Show inactive currencies"/>
                </search>
            </field>
        </record>

        <record id="view_currency_tree" model="ir.ui.view">
            <field name="name">res.currency.tree</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <tree string="Currencies" decoration-muted="(not active)">
                    <field name="name"/>
                    <field name="symbol"/>
                    <field name="rate_ids" invisible="1"/>
                    <field name="date"/>
                    <field name="rate"/>
                    <field name="active"/>
                </tree>
            </field>
        </record>

        <record id="view_currency_form" model="ir.ui.view">
            <field name="name">res.currency.form</field>
            <field name="model">res.currency</field>
            <field name="arch" type="xml">
                <form string="Currency">
                    <header>
                        <button name="%(act_view_currency_rates)d" string="View Rates" type="action" attrs="{'invisible': [('active', '=', False)]}"/>
                    </header>
                    <sheet>
                        <group col="4">
                            <field name="name"/>
                            <field name="rate"/>
                            <field name="active"/>
                        </group>

                        <group groups="base.group_no_one">
                            <group string="Price Accuracy">
                                <field name="rounding"/>
                                <field name="decimal_places"/>
                            </group>

                            <group string="Display">
                                <field name="symbol"/>
                                <field name="position"/>
                            </group>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
        <record id="action_currency_form" model="ir.actions.act_window">
            <field name="name">Currencies</field>
            <field name="res_model">res.currency</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="search_view_id" ref="view_currency_search"/>
            <field name="context">{'active_test': False}</field>
        </record>

        <menuitem action="action_currency_form" id="menu_action_currency_form" parent="menu_localisation" sequence="3" groups="base.group_multi_currency"/>

    </data>
</openerp>

{'fraction_non_alphanumeric': 0.1471524196203226, 'fraction_numerical': 0.0013168001755733568, 'mean_word_length': 1.5422594142259414, 'pattern_counts': {'":': 0, '<': 211, '<?xml version=': 2, '>': 211, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '2881102', 'n_tokens_mistral': 2397, 'n_tokens_neox': 2274, 'n_words': 411}