<commit_before><?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <!-- Child type and subtypes -->
    <record id="tile_type_child" model="mobile.app.tile.type">
        <field name="name">Child</field>
        <field name="code">Child</field>
        <field name="view_order">1</field>
    </record>

    <record id="tile_subtype_ch1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Default child card</field>
        <field name="code">CH1</field>
        <field name="view_order">1</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">${ctx['objects'].get_list('preferred_name', 1, 'Thank you')}</field>
        <field name="default_body"><![CDATA[% set child = ctx['objects']
% if len(child) == 1:
You're changing ${child.get('his')} life
% else:
You're changing ${child.get_number()}
% endif
Thank You]]>
        </field>
        <field name="default_action_text">${"My child" if len(ctx['objects']) == 1 else "My children"}</field>
        <field name="default_action_destination">Child selector</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH1.jpg"/>
    </record>
    <record id="tile_subtype_ch2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Child photo list</field>
        <field name="code">CH2</field>
        <field name="view_order">2</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">Photos</field>
        <field name="default_action_text">${ctx['objects'].get_list('preferred_name', 1, 'My children photos')}</field>
        <field name="default_action_destination">Photos overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH2.jpg"/>
    </record>
    <record id="tile_subtype_cht1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Child new photo</field>
        <field name="code">CH-T1</field>
        <field name="view_order">2</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">New Photo</field>
        <field name="default_action_text">${ctx['objects'].get_list('preferred_name', 1, 'My children photos')}</field>
        <field name="default_action_destination">Photos overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH2.jpg"/>
    </record>
    <record id="tile_subtype_ch3" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Children random fact</field>
        <field name="code">CH3</field>
        <field name="view_order">3</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_action_destination">Child selector</field>
        <field name="default_action_text">${"My child" if len(child) == 1 else "My children"}</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH3.jpg"/>
    </record>
    <record id="tile_subtype_cht2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Single child fact</field>
        <field name="code">CH_T2</field>
        <field name="view_order">3</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_action_destination">Individual child page</field>
        <field name="default_action_text">Thank You</field>
        <field name="default_body">You're changing ${ctx['objects'].get('his')} life</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH1.jpg"/>
    </record>

    <!-- Gift type and subtypes -->
    <record id="tile_type_donation" model="mobile.app.tile.type">
        <field name="name">Donation</field>
        <field name="code">Giving</field>
        <field name="view_order">2</field>
    </record>

    <record id="tile_subtype_gi1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Fund donation</field>
        <field name="code">GI1</field>
        <field name="view_order">1</field>
        <field name="default_model_id" ref="model_product_product"/>
        <field name="default_title">${ctx['objects'].name}</field>
        <field name="default_body">${ctx['objects'].description_sale}</field>
        <field name="default_action_text">Donate</field>
        <field name="default_action_destination">Give overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI1.jpg"/>
    </record>
    <record id="tile_subtype_gi3" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Give a gift</field>
        <field name="code">GI3</field>
        <field name="view_order">5</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">${ctx['objects'].name}</field>
        <field name="default_body">Send a gift to your sponsored child</field>
        <field name="default_action_text">Give a gift</field>
        <field name="default_action_destination">Give a gift overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI3.png"/>
    </record>
    <record id="tile_subtype_gi5" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">General donation call</field>
        <field name="code">GI5</field>
        <field name="view_order">10</field>
        <field name="default_model_id" ref="model_res_partner"/>
        <field name="default_body"><![CDATA[% set partner = ctx['objects'].sudo()
% set invoice = partner.env['account.invoice'].search([('partner_id', '=', partner.id), ('state', '=', 'paid'), ('invoice_type', '!=', 'sponsorship')], order='last_payment desc', limit=1)
% if invoice:
You gave CHF ${invoice.amount_total} on ${invoice.get_date('last_payment')}
% else:
Make a donation]]></field>
        <field name="default_action_text">Give a donation</field>
        <field name="default_action_destination">Give overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI5.png"/>
    </record>
    <record id="tile_subtype_gi7" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Awaiting sponsorship</field>
        <field name="code">GI7</field>
        <field name="view_order">5</field>
        <field name="default_model_id" ref="model_recurring_contract"/>
        <field name="default_title">${ctx['objects'].sudo().child_id.preferred_name}</field>
        <field name="default_records_filter">lambda c: (c.state in ['draft', 'waiting']) and not c.parent_id</field>
        <field name="default_body">You have not yet paid your sponsorship</field>
       <field name="default_action_text">Pay now</field>
       <field name="default_action_destination">Give overlay</field>
       <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI7.png"/>
    </record>

    <!-- Prayer type and subtypes -->
    <record id="tile_type_prayer" model="mobile.app.tile.type">
        <field name="name">Prayer</field>
        <field name="code">Prayer</field>
        <field name="view_order">3</field>
    </record>

    <record id="tile_subtype_pr_t1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/>
        <field name="name">Instagram prayer</field>
        <field name="code">PR_T1</field>
        <field name="view_order">1</field>
        <field name="default_action_destination">Read overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/PR_T1.png"/>
    </record>
    <record id="tile_subtype_pr_t2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/>
        <field name="name">Twitter Prayer</field>
        <field name="code">PR_T2</field>
        <field name="view_order">5</field>
        <field name="default_action_destination">Read overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/PR_T2.png"/>
    </record>
    <record id="tile_subtype_pr1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/><commit_msg>FIX default filter of GI7 tiles<commit_after><?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <!-- Child type and subtypes -->
    <record id="tile_type_child" model="mobile.app.tile.type">
        <field name="name">Child</field>
        <field name="code">Child</field>
        <field name="view_order">1</field>
    </record>

    <record id="tile_subtype_ch1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Default child card</field>
        <field name="code">CH1</field>
        <field name="view_order">1</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">${ctx['objects'].get_list('preferred_name', 1, 'Thank you')}</field>
        <field name="default_body"><![CDATA[% set child = ctx['objects']
% if len(child) == 1:
You're changing ${child.get('his')} life
% else:
You're changing ${child.get_number()}
% endif
Thank You]]>
        </field>
        <field name="default_action_text">${"My child" if len(ctx['objects']) == 1 else "My children"}</field>
        <field name="default_action_destination">Child selector</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH1.jpg"/>
    </record>
    <record id="tile_subtype_ch2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Child photo list</field>
        <field name="code">CH2</field>
        <field name="view_order">2</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">Photos</field>
        <field name="default_action_text">${ctx['objects'].get_list('preferred_name', 1, 'My children photos')}</field>
        <field name="default_action_destination">Photos overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH2.jpg"/>
    </record>
    <record id="tile_subtype_cht1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Child new photo</field>
        <field name="code">CH-T1</field>
        <field name="view_order">2</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">New Photo</field>
        <field name="default_action_text">${ctx['objects'].get_list('preferred_name', 1, 'My children photos')}</field>
        <field name="default_action_destination">Photos overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH2.jpg"/>
    </record>
    <record id="tile_subtype_ch3" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Children random fact</field>
        <field name="code">CH3</field>
        <field name="view_order">3</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_action_destination">Child selector</field>
        <field name="default_action_text">${"My child" if len(child) == 1 else "My children"}</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH3.jpg"/>
    </record>
    <record id="tile_subtype_cht2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_child"/>
        <field name="name">Single child fact</field>
        <field name="code">CH_T2</field>
        <field name="view_order">3</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_action_destination">Individual child page</field>
        <field name="default_action_text">Thank You</field>
        <field name="default_body">You're changing ${ctx['objects'].get('his')} life</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/CH1.jpg"/>
    </record>

    <!-- Gift type and subtypes -->
    <record id="tile_type_donation" model="mobile.app.tile.type">
        <field name="name">Donation</field>
        <field name="code">Giving</field>
        <field name="view_order">2</field>
    </record>

    <record id="tile_subtype_gi1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Fund donation</field>
        <field name="code">GI1</field>
        <field name="view_order">1</field>
        <field name="default_model_id" ref="model_product_product"/>
        <field name="default_title">${ctx['objects'].name}</field>
        <field name="default_body">${ctx['objects'].description_sale}</field>
        <field name="default_action_text">Donate</field>
        <field name="default_action_destination">Give overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI1.jpg"/>
    </record>
    <record id="tile_subtype_gi3" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Give a gift</field>
        <field name="code">GI3</field>
        <field name="view_order">5</field>
        <field name="default_model_id" ref="model_compassion_child"/>
        <field name="default_title">${ctx['objects'].name}</field>
        <field name="default_body">Send a gift to your sponsored child</field>
        <field name="default_action_text">Give a gift</field>
        <field name="default_action_destination">Give a gift overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI3.png"/>
    </record>
    <record id="tile_subtype_gi5" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">General donation call</field>
        <field name="code">GI5</field>
        <field name="view_order">10</field>
        <field name="default_model_id" ref="model_res_partner"/>
        <field name="default_body"><![CDATA[% set partner = ctx['objects'].sudo()
% set invoice = partner.env['account.invoice'].search([('partner_id', '=', partner.id), ('state', '=', 'paid'), ('invoice_type', '!=', 'sponsorship')], order='last_payment desc', limit=1)
% if invoice:
You gave CHF ${invoice.amount_total} on ${invoice.get_date('last_payment')}
% else:
Make a donation]]></field>
        <field name="default_action_text">Give a donation</field>
        <field name="default_action_destination">Give overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI5.png"/>
    </record>
    <record id="tile_subtype_gi7" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_donation"/>
        <field name="name">Awaiting sponsorship</field>
        <field name="code">GI7</field>
        <field name="view_order">5</field>
        <field name="default_model_id" ref="model_recurring_contract"/>
        <field name="default_title">${ctx['objects'].sudo().child_id.preferred_name}</field>
        <field name="default_records_filter">lambda c: (c.state in ['draft', 'waiting']) and not c.parent_id and c.child_id</field>
        <field name="default_body">You have not yet paid your sponsorship</field>
       <field name="default_action_text">Pay now</field>
       <field name="default_action_destination">Give overlay</field>
       <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/GI7.png"/>
    </record>

    <!-- Prayer type and subtypes -->
    <record id="tile_type_prayer" model="mobile.app.tile.type">
        <field name="name">Prayer</field>
        <field name="code">Prayer</field>
        <field name="view_order">3</field>
    </record>

    <record id="tile_subtype_pr_t1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/>
        <field name="name">Instagram prayer</field>
        <field name="code">PR_T1</field>
        <field name="view_order">1</field>
        <field name="default_action_destination">Read overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/PR_T1.png"/>
    </record>
    <record id="tile_subtype_pr_t2" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/>
        <field name="name">Twitter Prayer</field>
        <field name="code">PR_T2</field>
        <field name="view_order">5</field>
        <field name="default_action_destination">Read overlay</field>
        <field name="tile_preview" type="base64" file="mobile_app_connector/static/img/PR_T2.png"/>
    </record>
    <record id="tile_subtype_pr1" model="mobile.app.tile.subtype">
        <field name="type_id" ref="tile_type_prayer"/>
{'fraction_non_alphanumeric': 0.16916882369859074, 'fraction_numerical': 0.009375898763301697, 'mean_word_length': 4.029216083309228, 'pattern_counts': {'":': 0, '<': 439, '<?xml version=': 2, '>': 439, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1074795', 'n_tokens_mistral': 5570, 'n_tokens_neox': 5438, 'n_words': 932}