<commit_before><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- Top menu item -->
        <menuitem name="Portal"
            id="portal_menu"
            groups="portal.group_portal,portal.group_anonymous"
            sequence="15"/>

        <menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10" groups="portal.group_portal"/>
        <record id="action_mail_inbox_feeds_portal" model="ir.actions.client">
            <field name="name">Inbox</field>
            <field name="tag">mail.wall</field>
            <field name="res_model">mail.message</field>
            <field name="context">{
              'default_model': 'res.users', 
              'default_res_id': uid,
            }</field>
            <field name="params" eval="&quot;{
                'domain': [
                  ('to_read', '=', True),
                  ('starred', '=', False),
                ],
                'show_compose_message': False,
                'show_link': False,
                'view_mailbox': True,
                'view_inbox': True,
                'read_action': 'read'
            }&quot;"/>
            <field name="help" type="html">
                <p>
                    <b>Good Job!</b> Your inbox is empty.
                </p><p>
                    Your inbox contains private messages or emails sent to you
                    as well as information related to documents or people you
                    follow.
                </p>
            </field>
        </record>
        <menuitem name="Inbox" id="portal_inbox" parent="portal_messages"
            action="action_mail_inbox_feeds_portal" sequence="10" groups="portal.group_portal"/>
        <!--
            Create menu items that we'll leave empty for now - they'll be
            filled up by other portal modules.
        -->
        <menuitem name="Quotations and Sales Orders" id="portal_orders" parent="portal_menu" sequence="20"/>
        <menuitem name="After Sale Services" id="portal_after_sales" parent="portal_menu" sequence="30"/>
        <menuitem name="Projects" id="portal_projects" parent="portal_menu" sequence="40"/>

        <menuitem name="About Us" id="portal_company" parent="portal_menu" sequence="200"/>
        <menuitem name="News" id="portal_company_news" parent="portal_company" sequence="10" action="action_news"/>
        <menuitem name="Jobs" id="portal_jobs" parent="portal_company" sequence="20" action="action_jobs"/>

        <!-- extend res.groups search view -->
        <record id="group_search_view" model="ir.ui.view">
            <field name="name">Group Search</field>
            <field name="model">res.groups</field>
            <field name="inherit_id" ref="base.view_groups_search"/>
            <field name="arch" type="xml">
                <field name="name" position="after">
                    <filter name="portal" string="Portal Groups" domain="[('is_portal','=',True)]"/>
                    <filter name="no_portal" string="Non-Portal Groups" domain="[('is_portal','=',False)]"/>
                    <separator orientation="vertical"/>
                </field>
            </field>
        </record>

        <!-- extend res.groups form view -->
        <record id="group_form_view" model="ir.ui.view">
            <field name="name">Portal Form</field>
            <field name="model">res.groups</field>
            <field name="inherit_id" ref="base.view_groups_form"/>
            <field name="arch" type="xml">
                <field name="name" position="after">
                    <field name="is_portal"/>
                </field>
            </field>
        </record>

    </data>
</openerp>
<commit_msg>[FIX] add a 'to-do' menu for portal users<commit_after><?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- Top menu item -->
        <menuitem name="Portal"
            id="portal_menu"
            groups="portal.group_portal,portal.group_anonymous"
            sequence="15"/>

        <menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10" groups="portal.group_portal"/>

        <record id="action_mail_inbox_feeds_portal" model="ir.actions.client">
            <field name="name">Inbox</field>
            <field name="tag">mail.wall</field>
            <field name="res_model">mail.message</field>
            <field name="context">{
              'default_model': 'res.users',
              'default_res_id': uid,
            }</field>
            <field name="params" eval="&quot;{
                'domain': [
                  ('to_read', '=', True),
                  ('starred', '=', False),
                ],
                'show_compose_message': False,
                'show_link': False,
                'view_mailbox': True,
                'view_inbox': True,
                'read_action': 'read'
            }&quot;"/>
            <field name="help" type="html">
                <p>
                    <b>Good Job!</b> Your inbox is empty.
                </p><p>
                    Your inbox contains private messages or emails sent to you
                    as well as information related to documents or people you
                    follow.
                </p>
            </field>
        </record>

        <record id="action_mail_star_feeds_portal" model="ir.actions.client">
            <field name="name">To-do</field>
            <field name="tag">mail.wall</field>
            <field name="res_model">mail.message</field>
            <field name="context">{
              'default_model': 'res.users',
              'default_res_id': uid,
              'search_default_message_unread': True
            }</field>
            <field name="params" eval="&quot;{
                'domain': [
                    ('starred', '=', True),
                ],
                'show_compose_message': False,
                'show_link': False,
                'view_mailbox': True,
                'read_action': 'read'
            }&quot;"/>
            <field name="help" type="html">
                <p>
                    <b>No todo.</b>
                </p><p>
                    When you process messages in your inbox, you can mark some
                    as <i>todo</i>. From this menu, you can process all your todo.
                </p>
            </field>
        </record>

        <menuitem name="Inbox" id="portal_inbox" parent="portal_messages"
            action="action_mail_inbox_feeds_portal" sequence="10" groups="portal.group_portal"/>
        <menuitem name="To-do" id="portal_mail_starfeeds" parent="portal_messages"
            action="action_mail_star_feeds_portal" sequence="20" groups="portal.group_portal"/>

        <!--
            Create menu items that we'll leave empty for now - they'll be
            filled up by other portal modules.
        -->
        <menuitem name="Quotations and Sales Orders" id="portal_orders" parent="portal_menu" sequence="20"/>
        <menuitem name="After Sale Services" id="portal_after_sales" parent="portal_menu" sequence="30"/>
        <menuitem name="Projects" id="portal_projects" parent="portal_menu" sequence="40"/>

        <menuitem name="About Us" id="portal_company" parent="portal_menu" sequence="200"/>
        <menuitem name="News" id="portal_company_news" parent="portal_company" sequence="10" action="action_news"/>
        <menuitem name="Jobs" id="portal_jobs" parent="portal_company" sequence="20" action="action_jobs"/>

        <!-- extend res.groups search view -->
        <record id="group_search_view" model="ir.ui.view">
            <field name="name">Group Search</field>
            <field name="model">res.groups</field>
            <field name="inherit_id" ref="base.view_groups_search"/>
            <field name="arch" type="xml">
                <field name="name" position="after">
                    <filter name="portal" string="Portal Groups" domain="[('is_portal','=',True)]"/>
                    <filter name="no_portal" string="Non-Portal Groups" domain="[('is_portal','=',False)]"/>
                    <separator orientation="vertical"/>
                </field>
            </field>
        </record>

        <!-- extend res.groups form view -->
        <record id="group_form_view" model="ir.ui.view">
            <field name="name">Portal Form</field>
            <field name="model">res.groups</field>
            <field name="inherit_id" ref="base.view_groups_form"/>
            <field name="arch" type="xml">
                <field name="name" position="after">
                    <field name="is_portal"/>
                </field>
            </field>
        </record>

    </data>
</openerp>

{'fraction_non_alphanumeric': 0.14629097182288672, 'fraction_numerical': 0.005290396779758482, 'mean_word_length': 1.9181208053691274, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 2, '>': 151, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7364539', 'n_tokens_mistral': 2455, 'n_tokens_neox': 2419, 'n_words': 509}