<commit_before><?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - <NAME>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->

<openerp>
<data>

<record model="ir.ui.view" id="product_template_form_fields">
    <field name="name">Event products</field>
    <field name="model">product.template</field>
    <field name="inherit_id"
           ref="event_sale.event_sale_product_template_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='event_type_id']" position="attributes">
            <attribute name="attrs">{
                "invisible": [("event_ok", "=", False),
                              ("is_event", "=", False)],
            }</attribute>
        </xpath>

        <xpath expr="//div[@name='options']">
            <field name="is_event"/>
            <label for="is_event"/>
        </xpath>
    </field>
</record>

<record model="ir.ui.view" id="product_template_form_button">
    <field name="name">Events for this product</field>
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_only_form_view"/>
    <field name="groups_id" eval="[(4, ref('event.group_event_user'))]"/>
    <field name="arch" type="xml">
        <xpath expr="//div[@name='buttons']" position="inside">
            <button class="oe_inline oe_stat_button"
                    name="action_view_events"<commit_msg>Hide field for non-event users.<commit_after><?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - <NAME>
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->

<openerp>
<data>

<record model="ir.ui.view" id="product_template_form_fields">
    <field name="name">Event products</field>
    <field name="model">product.template</field>
    <field name="inherit_id"
           ref="event_sale.event_sale_product_template_form"/>
    <field name="groups_id" eval="[(4, ref('event.group_event_user'))]"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='event_type_id']" position="attributes">
            <attribute name="attrs">{
                "invisible": [("event_ok", "=", False),
                              ("is_event", "=", False)],
            }</attribute>
        </xpath>

        <xpath expr="//div[@name='options']">
            <field name="is_event"/>
            <label for="is_event"/>
        </xpath>
    </field>
</record>

<record model="ir.ui.view" id="product_template_form_button">
    <field name="name">Events for this product</field>
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_only_form_view"/>
    <field name="groups_id" eval="[(4, ref('event.group_event_user'))]"/>
    <field name="arch" type="xml">
        <xpath expr="//div[@name='buttons']" position="inside">
            <button class="oe_inline oe_stat_button"
                    name="action_view_events"
{'fraction_non_alphanumeric': 0.185, 'fraction_numerical': 0.007, 'mean_word_length': 3.0719131614654, 'pattern_counts': {'":': 2, '<': 68, '<?xml version=': 2, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, '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': '4250169', 'n_tokens_mistral': 974, 'n_tokens_neox': 951, 'n_words': 169}