<commit_before><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ACSONE SA/NV
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="distribution_list_search" model="ir.ui.view">
        <field name="name">distribution.list.search (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_search" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='alias_name']" position="after">
                <field name="code" />
                <field name="int_instance_id" />
                <field name="partner_id" />
            </xpath>
            <xpath expr="//filter[@name='dst_model']" position="after">
                <filter
                    name="instance"
                    string="Internal Instance"
                    domain="[]"
                    context="{'group_by':'int_instance_id'}"
                />
            </xpath>
            <xpath expr="//filter[@name='newsletter']" position="after">
                <separator />
                <filter
                    name="public"
                    string="Public Newsletters"
                    domain="[('newsletter','=',True),('public','=',True)]"
                />
            </xpath>
            <xpath expr="//group" position="before">
                <separator />
                <filter
                    name="my_lists"
                    string="My Lists"
                    domain="[('res_users_ids', 'in', [uid])]"
                    help="Distribution Lists of which I am an owner"
                />
                <separator />
                <filter
                    name="expired"
                    string="Expired"
                    context="{'invisible_expire_date': False}"
                    domain="[('active','=',False)]"
                    help="Expired Distribution Lists"
                />
                <filter
                    name="all"
                    string="All"
                    context="{'invisible_expire_date': False}"
                    domain="['|', ('active', '=', True), ('active', '!=', True)]"
                    help="All Distribution Lists, expired or not"
                />
            </xpath>
        </field>
    </record>

    <record id="distribution_list_tree" model="ir.ui.view">
        <field name="name">distribution.list.tree (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_tree" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='name']" position="after">
                <field name="int_instance_id" />
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="attributes">
                <attribute
                    name="groups"
                    translation="off"
                >base.group_erp_manager</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="after">
                <button
                    name="%(distribution_list_mass_function_action)d"
                    type="action"
                    string="Mass Action"
                    attrs="{'invisible':[('active', '=', False)]}"
                    icon="fa-paper-plane"
                />
                <field
                    name="expire_date"
                    invisible="context.get('invisible_expire_date', True)"
                />
                <field name="active" groups="base.group_erp_manager" />
            </xpath>

            <xpath expr="//button[@name='action_show_result']" position="attributes">
                <attribute
                    name="attrs"
                    translation="off"
                >{'invisible':[('active', '=', False)]}</attribute>
            </xpath>

            <xpath expr="//button[@name='action_show_result']" position="after">
                <button
                    name="action_show_result_without_coordinate"
                    string="Without Coordinate"
                    attrs="{'invisible':[('active', '=', False)]}"
                    type="object"
                    icon="fa-address-card text-danger"
                />
            </xpath>
        </field>
    </record>

    <record id="distribution_list_form" model="ir.ui.view">
        <field name="name">distribution.list.form (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_form" />
        <field name="arch" type="xml">
            <xpath expr="//header" position="attributes">
                <attribute
                    name="attrs"
                    translation="off"
                >{'invisible': ['|',('id', '=', False),('active', '=', False)]}</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="attributes">
                <attribute
                    name="groups"
                    translation="off"
                >base.group_erp_manager</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="after">
                <button
                    name="%(distribution_list_mass_function_action)d"
                    type="action"
                    string="Mass Action"
                />
            </xpath>

            <xpath expr="//sheet/div[@name='button_box']" position="inside">
                <button
                    name="action_show_result_without_coordinate"
                    class="oe_stat_button"
                    string="Without Coordinate"
                    icon="fa-address-card text-danger"
                    type="object"
                    attrs="{'invisible': [('id','=',False)]}"
                />

            <field name="active" invisible="1" />
            <widget
                    name="web_ribbon"
                    title="Archived"
                    bg_color="bg-danger"
                    attrs="{'invisible': [('active', '=', True)]}"
                />
<commit_msg>[UPD] mozaik_communication: hide button Mass Mailing on distribution lists<commit_after><?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2018 ACSONE SA/NV
     License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
    <record id="distribution_list_search" model="ir.ui.view">
        <field name="name">distribution.list.search (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_search" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='alias_name']" position="after">
                <field name="code" />
                <field name="int_instance_id" />
                <field name="partner_id" />
            </xpath>
            <xpath expr="//filter[@name='dst_model']" position="after">
                <filter
                    name="instance"
                    string="Internal Instance"
                    domain="[]"
                    context="{'group_by':'int_instance_id'}"
                />
            </xpath>
            <xpath expr="//filter[@name='newsletter']" position="after">
                <separator />
                <filter
                    name="public"
                    string="Public Newsletters"
                    domain="[('newsletter','=',True),('public','=',True)]"
                />
            </xpath>
            <xpath expr="//group" position="before">
                <separator />
                <filter
                    name="my_lists"
                    string="My Lists"
                    domain="[('res_users_ids', 'in', [uid])]"
                    help="Distribution Lists of which I am an owner"
                />
                <separator />
                <filter
                    name="expired"
                    string="Expired"
                    context="{'invisible_expire_date': False}"
                    domain="[('active','=',False)]"
                    help="Expired Distribution Lists"
                />
                <filter
                    name="all"
                    string="All"
                    context="{'invisible_expire_date': False}"
                    domain="['|', ('active', '=', True), ('active', '!=', True)]"
                    help="All Distribution Lists, expired or not"
                />
            </xpath>
        </field>
    </record>

    <record id="distribution_list_tree" model="ir.ui.view">
        <field name="name">distribution.list.tree (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_tree" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='name']" position="after">
                <field name="int_instance_id" />
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="attributes">
                <attribute
                    name="groups"
                    translation="off"
                >base.group_erp_manager</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="after">
                <button
                    name="%(distribution_list_mass_function_action)d"
                    type="action"
                    string="Mass Action"
                    attrs="{'invisible':[('active', '=', False)]}"
                    icon="fa-paper-plane"
                />
                <field
                    name="expire_date"
                    invisible="context.get('invisible_expire_date', True)"
                />
                <field name="active" groups="base.group_erp_manager" />
            </xpath>

            <xpath expr="//button[@name='action_show_result']" position="attributes">
                <attribute
                    name="attrs"
                    translation="off"
                >{'invisible':[('active', '=', False)]}</attribute>
            </xpath>

            <xpath expr="//button[@name='action_show_result']" position="after">
                <button
                    name="action_show_result_without_coordinate"
                    string="Without Coordinate"
                    attrs="{'invisible':[('active', '=', False)]}"
                    type="object"
                    icon="fa-address-card text-danger"
                />
            </xpath>
        </field>
    </record>

    <record id="distribution_list_form" model="ir.ui.view">
        <field name="name">distribution.list.form (mozaik_communication)</field>
        <field name="model">distribution.list</field>
        <field name="inherit_id" ref="distribution_list.distribution_list_form" />
        <field name="arch" type="xml">
            <xpath expr="//header" position="attributes">
                <attribute
                    name="attrs"
                    translation="off"
                >{'invisible': ['|',('id', '=', False),('active', '=', False)]}</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="attributes">
                <attribute
                    name="groups"
                    translation="off"
                >base.group_erp_manager</attribute>
                <!-- Button mass mailing becomes invisible in v14: use mass action instead -->
                <attribute name="invisible">1</attribute>
            </xpath>

            <xpath expr="//button[@name='mass_mailing']" position="after">
                <button
                    name="%(distribution_list_mass_function_action)d"
                    type="action"
                    string="Mass Action"
                />
            </xpath>

            <xpath expr="//sheet/div[@name='button_box']" position="inside">
                <button
                    name="action_show_result_without_coordinate"
                    class="oe_stat_button"
                    string="Without Coordinate"
                    icon="fa-address-card text-danger"
                    type="object"
                    attrs="{'invisible': [('id','=',False)]}"
                />

            <field name="active" invisible="1" />
            <widget
                    name="web_ribbon"
                    title="Archived"
                    bg_color="bg-danger"
                    attrs="{'invisible': [('active', '=', True)]}"
                />

{'fraction_non_alphanumeric': 0.146036489462095, 'fraction_numerical': 0.0018087448883296635, 'mean_word_length': 1.4726813144079332, 'pattern_counts': {'":': 0, '<': 168, '<?xml version=': 2, '>': 168, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6808613', 'n_tokens_mistral': 3391, 'n_tokens_neox': 3100, 'n_words': 503}