<commit_before><?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 Compassion (http://www.compassion.ch)
    @author <NAME> <<EMAIL>>
    The licence is in the file __openerp__.py
-->
<openerp>
    <data>
        <!-- GMC Message Pool tree view -->
        <record id="view_gmc_message_pool_incoming_tree" model="ir.ui.view">
            <field name="name">gmc.message.pool.incoming.tree</field>
            <field name="model">gmc.message.pool</field>
            <field name="priority">17</field>
            <field name="arch" type="xml">
                <tree string="Message Pool" colors="blue:state == 'new';black:state == 'pending';gray:state == 'success';red:state == 'failure'" create="false">
                    <field name="action_id" />
                    <field name="date" />
                    <field name="process_date" />
                    <field name="state" />
                </tree>
            </field>
        </record>
        <record id="view_gmc_message_pool_outgoing_tree" model="ir.ui.view">
            <field name="name">gmc.message.pool.outgoing.tree</field>
            <field name="model">gmc.message.pool</field>
            <field name="priority">12</field>
            <field name="arch" type="xml">
                <tree string="Message Pool" colors="blue:state == 'new';black:state == 'pending';gray:state == 'success';red:state == 'failure'" create="false">
                    <field name="action_id" />
                    <field name="date" />
                    <field name="process_date" />
                    <field name="state" />
                </tree>
            </field>
        </record>

        
        <!-- GMC Message Pool form view -->
        <record id="view_gmc_message_pool_form" model="ir.ui.view">
            <field name="name">gmc.message.pool.form</field>
            <field name="model">gmc.message.pool</field>
            <field name="arch" type="xml">
                <form string="GMC Message" create="false">
                    <header>
                        <field name="state" widget="statusbar" statusbar_visible="new,pending,success" />
                        <button name="process_messages" type="object" class="oe_highlight" string="Process Message" states="new" />
                        <button name="reset_message" type="object" string="Set back to New" states="failure,pending"/>
                        <button name="force_success" type="object" string="Success" groups="base.group_erp_manager" attrs="{'invisible':[('state','=','success')]}"/>
                    </header>
                    <sheet>
                        <div class="oe_title">
                            <h1>
                                <field name="action_id"/>
                                <field name="name" invisible="1"/>
                            </h1>
                        </div>
                        <group>
                            <field name="direction" invisible="1" />
                            <field name="date" />
                            <field name="process_date" />
                            <field name="request_id" attrs="{'invisible':[('direction','=','in')]}" states="pending"/>
                            <field name="failure_reason"/>
                        </group>
                        <group>
                            <field name="description" colspan="4"/>
                            <field name="headers" colspan="4"/>
                            <field name="content" colspan="4"/>
                        </group>
                        
                    </sheet>
                    <div class="oe_chatter">
                        <field name="message_follower_ids" widget="mail_followers"/>
                        <field name="message_ids" widget="mail_thread"/>
                    </div>
                </form>
            </field>
        </record>


        <!-- GMC Action views -->
        <record id="view_gmc_action_form" model="ir.ui.view">
            <field name="name">gmc.action.form</field>
            <field name="model">gmc.action</field>
            <field name="arch" type="xml">
                <form string="GMC Action" version="7.0">
                    <sheet>
                        <group>
                            <field name="name"/>
                            <field name="direction"/>
                            <field name="model"/>
                            <field name="description"/>
                            <field name="connect_service"/>
                            <field name="request_type"/>
                            <field name="auto_process"/>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
        <record id="view_gmc_action_tree" model="ir.ui.view">
            <field name="name">gmc.action.tree</field>
            <field name="model">gmc.action</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="name"/>
                    <field name="direction"/>
                    <field name="model"/>
                </tree>
            </field>
        </record>
        <record id="view_gmc_action_connect_tree" model="ir.ui.view">
            <field name="name">gmc.action.connect.tree</field>
            <field name="model">gmc.action.connect</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="connect_schema"/>
                    <field name="action_id"/>
                </tree>
            </field>
        </record>



        <!-- Search Filters -->
        <record id="view_gmc_message_pool_filter" model="ir.ui.view">
            <field name="name">gmc.message.pool.filter</field>
            <field name="model">gmc.message.pool</field>
            <field name="arch" type="xml">
                <search string="Search Partner">
                    <field name="action_id"/>
                    <field name="date"/>
                    <field name="process_date"/>
                    <filter string="Incoming" name="incoming" domain="[('direction','=','in')]" context="{'group_by':'action_id'}" />
                    <separator />
                    <filter string="Pending" name="pending" domain="['|', ('state','=','pending'), ('state','=','new')]" />
                    <filter string="Failed" name="failure" domain="[('state','=','failure')]" />
                    <filter string="Success" name="success" domain="[('state','=','success')]" />
                    <group expand="0" string="Group By...">
                        <filter string="Status" domain="[]" context="{'group_by':'state'}"/>
                        <filter string="Date" domain="[]" context="{'group_by':'date'}"/>
                        <filter string="Process Date" domain="[]" context="{'group_by':'process_date'}"/>
                    </group>
                </search>
            </field>
        </record>


        <!-- Sidebar actions, called from menuitems -->
        <record id="action_gmc_message_pool_form" model="ir.actions.act_window">
            <field name="name">Message Pool</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.message.pool</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                No messages.
              </p>
            </field>
        </record>
        
        <record id="action_gmc_message_incoming_form" model="ir.actions.act_window">
            <field name="name">Incoming Messages</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.message.pool</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'search_default_incoming':1, 'search_default_pending':1}</field>
            <field name="domain">[('direction', '=', 'in')]</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                No messages.
              </p>
            </field>
        </record>

        <record id="action_gmc_action" model="ir.actions.act_window">
            <field name="name">GMC Action</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.action</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <record id="action_gmc_action_connect" model="ir.actions.act_window">
            <field name="name">GMC Action to Connect</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.action.connect</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <!-- Menu Items -->
        <menuitem id="menu_message_center" name="Message Center" groups="group_gmc" />
        <menuitem id="menu_message_incoming" parent="menu_message_center" name="Incoming Messages" sequence="1" />
        <menuitem id="menu_message_incoming_all" parent="menu_message_incoming" action="action_gmc_message_incoming_form" sequence="1" />
        <menuitem id="menu_message_outgoing" name="Outgoing Messages" parent="menu_message_center" sequence="2"/>
        <menuitem id="menu_message_config" parent="menu_message_center" name="Configuration" groups="base.group_erp_manager"/>
        <menuitem id="menu_message_action" action="action_gmc_action" parent="menu_message_config"/><commit_msg>Update the module message_center_compassion to show outcomming message in "Message Center".<commit_after><?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2014 Compassion (http://www.compassion.ch)
    @author <NAME> <<EMAIL>>
    The licence is in the file __openerp__.py
-->
<openerp>
    <data>
        <!-- GMC Message Pool tree view -->
        <record id="view_gmc_message_pool_incoming_tree" model="ir.ui.view">
            <field name="name">gmc.message.pool.incoming.tree</field>
            <field name="model">gmc.message.pool</field>
            <field name="priority">17</field>
            <field name="arch" type="xml">
                <tree string="Message Pool" colors="blue:state == 'new';black:state == 'pending';gray:state == 'success';red:state == 'failure'" create="false">
                    <field name="action_id" />
                    <field name="date" />
                    <field name="process_date" />
                    <field name="state" />
                </tree>
            </field>
        </record>

        <record id="view_gmc_message_pool_outgoing_tree" model="ir.ui.view">
            <field name="name">gmc.message.pool.outgoing.tree</field>
            <field name="model">gmc.message.pool</field>
            <field name="priority">12</field>
            <field name="arch" type="xml">
                <tree string="Message Pool" colors="blue:state == 'new';black:state == 'pending';gray:state == 'success';red:state == 'failure'" create="false">
                    <field name="action_id" />
                    <field name="date" />
                    <field name="process_date" />
                    <field name="state" />
                </tree>
            </field>
        </record>

        
        <!-- GMC Message Pool form view -->
        <record id="view_gmc_message_pool_form" model="ir.ui.view">
            <field name="name">gmc.message.pool.form</field>
            <field name="model">gmc.message.pool</field>
            <field name="arch" type="xml">
                <form string="GMC Message" create="false">
                    <header>
                        <field name="state" widget="statusbar" statusbar_visible="new,pending,success" />
                        <button name="process_messages" type="object" class="oe_highlight" string="Process Message" states="new" />
                        <button name="reset_message" type="object" string="Set back to New" states="failure,pending"/>
                        <button name="force_success" type="object" string="Success" groups="base.group_erp_manager" attrs="{'invisible':[('state','=','success')]}"/>
                    </header>
                    <sheet>
                        <div class="oe_title">
                            <h1>
                                <field name="action_id"/>
                                <field name="name" invisible="1"/>
                            </h1>
                        </div>
                        <group>
                            <field name="direction" invisible="1" />
                            <field name="date" />
                            <field name="process_date" />
                            <field name="request_id" attrs="{'invisible':[('direction','=','in')]}" states="pending"/>
                            <field name="failure_reason"/>
                        </group>
                        <group>
                            <field name="description" colspan="4"/>
                            <field name="headers" colspan="4"/>
                            <field name="content" colspan="4"/>
                        </group>
                        
                    </sheet>
                    <div class="oe_chatter">
                        <field name="message_follower_ids" widget="mail_followers"/>
                        <field name="message_ids" widget="mail_thread"/>
                    </div>
                </form>
            </field>
        </record>


        <!-- GMC Action views -->
        <record id="view_gmc_action_form" model="ir.ui.view">
            <field name="name">gmc.action.form</field>
            <field name="model">gmc.action</field>
            <field name="arch" type="xml">
                <form string="GMC Action" version="7.0">
                    <sheet>
                        <group>
                            <field name="name"/>
                            <field name="direction"/>
                            <field name="model"/>
                            <field name="description"/>
                            <field name="connect_service"/>
                            <field name="request_type"/>
                            <field name="auto_process"/>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
        <record id="view_gmc_action_tree" model="ir.ui.view">
            <field name="name">gmc.action.tree</field>
            <field name="model">gmc.action</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="name"/>
                    <field name="direction"/>
                    <field name="model"/>
                </tree>
            </field>
        </record>
        <record id="view_gmc_action_connect_tree" model="ir.ui.view">
            <field name="name">gmc.action.connect.tree</field>
            <field name="model">gmc.action.connect</field>
            <field name="arch" type="xml">
                <tree>
                    <field name="connect_schema"/>
                    <field name="action_id"/>
                </tree>
            </field>
        </record>



        <!-- Search Filters -->
        <record id="view_gmc_message_pool_filter" model="ir.ui.view">
            <field name="name">gmc.message.pool.filter</field>
            <field name="model">gmc.message.pool</field>
            <field name="arch" type="xml">
                <search string="Search Partner">
                    <field name="action_id"/>
                    <field name="date"/>
                    <field name="process_date"/>
                    <filter string="Incoming" name="incoming" domain="[('direction','=','in')]" context="{'group_by':'action_id'}" />
                    <separator />
                    <filter string="Pending" name="pending" domain="['|', ('state','=','pending'), ('state','=','new')]" />
                    <filter string="Failed" name="failure" domain="[('state','=','failure')]" />
                    <filter string="Success" name="success" domain="[('state','=','success')]" />
                    <group expand="0" string="Group By...">
                        <filter string="Status" domain="[]" context="{'group_by':'state'}"/>
                        <filter string="Date" domain="[]" context="{'group_by':'date'}"/>
                        <filter string="Process Date" domain="[]" context="{'group_by':'process_date'}"/>
                    </group>
                </search>
            </field>
        </record>


        <!-- Sidebar actions, called from menuitems -->
        <record id="action_gmc_message_pool_form" model="ir.actions.act_window">
            <field name="name">Message Pool</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.message.pool</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                No messages.
              </p>
            </field>
        </record>
        
        <record id="action_gmc_message_incoming_form" model="ir.actions.act_window">
            <field name="name">Incoming Messages</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.message.pool</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'search_default_incoming':1, 'search_default_pending':1}</field>
            <field name="domain">[('direction', '=', 'in')]</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                No messages.
              </p>
            </field>
        </record>

        <record id="action_gmc_message_outgoing_form" model="ir.actions.act_window">
            <field name="name">Outgoing Messages</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.message.pool</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="context">{'search_default_pending':1}</field>
            <field name="domain">[('direction', '=', 'out')]</field>
            <field name="help" type="html">
              <p class="oe_view_nocontent_create">
                No messages.
              </p>
            </field>
        </record>

        <record id="action_gmc_action" model="ir.actions.act_window">
            <field name="name">GMC Action</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.action</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <record id="action_gmc_action_connect" model="ir.actions.act_window">
            <field name="name">GMC Action to Connect</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">gmc.action.connect</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <!-- Menu Items -->
        <menuitem id="menu_message_center" name="Message Center" groups="group_gmc" />
        <menuitem id="menu_message_incoming" parent="menu_message_center" name="Incoming Messages" sequence="1" />
        <menuitem id="menu_message_incoming_all" parent="menu_message_incoming" action="action_gmc_message_incoming_form" sequence="1" />
        <menuitem id="menu_message_outgoing" name="Outgoing Messages" parent="menu_message_center" sequence="2"/>
        <menuitem id="menu_message_outgoing_gmc_action" parent="menu_message_outgoing" action="action_gmc_message_outgoing_form"  sequence="1"/>
        <menuitem id="menu_message_config" parent="menu_message_center" name="Configuration" groups="base.group_erp_manager"/>
        <menuitem id="menu_message_action" action="action_gmc_action" parent="menu_message_config"/>
{'fraction_non_alphanumeric': 0.15462610899873258, 'fraction_numerical': 0.0026323486399532025, 'mean_word_length': 1.736062950120032, 'pattern_counts': {'":': 0, '<': 464, '<?xml version=': 2, '>': 464, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 16}, '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': '5521174', 'n_tokens_mistral': 5559, 'n_tokens_neox': 5377, 'n_words': 937}