[MERGE] added menuitems for portal user to check their 'TODO' messages list and their...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 25 Feb 2013 18:17:47 +0000 (19:17 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Mon, 25 Feb 2013 18:17:47 +0000 (19:17 +0100)
bzr revid: qdp-launchpad@openerp.com-20130225181747-c4ixcb40t3g5mv0i

addons/mail/mail_thread_view.xml
addons/portal/portal_view.xml

index 6769fb0..75c86e4 100644 (file)
@@ -6,7 +6,7 @@
             <field name="tag">mail.wall</field>
             <field name="res_model">mail.message</field>
             <field name="context">{
-              'default_model': 'res.users', 
+              'default_model': 'res.users',
               'default_res_id': uid,
             }</field>
             <field name="params" eval="&quot;{
@@ -34,8 +34,8 @@
             <field name="tag">mail.wall</field>
             <field name="res_model">mail.message</field>
             <field name="context">{
-              'default_model': 'res.users', 
-              'default_res_id': uid, 
+              'default_model': 'res.users',
+              'default_res_id': uid,
               'search_default_message_unread': True
             }</field>
             <field name="params" eval="&quot;{
@@ -44,7 +44,8 @@
                 ],
                 'view_mailbox': True,
                 'read_action': 'read',
-                'show_compose_message': False }&quot;"/>
+                'show_compose_message': False
+            }&quot;"/>
             <field name="help" type="html">
                 <p>
                     <b>No private message.</b>
@@ -59,8 +60,8 @@
             <field name="tag">mail.wall</field>
             <field name="res_model">mail.message</field>
             <field name="context">{
-              'default_model': 'res.users', 
-              'default_res_id': uid, 
+              'default_model': 'res.users',
+              'default_res_id': uid,
               'search_default_message_unread': True
             }</field>
             <field name="params" eval="&quot;{
@@ -69,7 +70,8 @@
                 ],
                 'view_mailbox': True,
                 'read_action': 'read',
-                'compose_as_todo': True }&quot;"/>
+                'compose_as_todo': True
+            }&quot;"/>
             <field name="help" type="html">
                 <p>
                     <b>No todo.</b>
@@ -84,7 +86,7 @@
             <field name="name">Archives</field>
             <field name="tag">mail.wall</field>
             <field name="context">{
-              'default_model': 'res.users', 
+              'default_model': 'res.users',
               'default_res_id': uid
             }</field>
             <field name="params" eval="&quot;{
@@ -94,7 +96,8 @@
                     ('author_id.user_ids', 'in', [uid]),
                 ],
                 'view_mailbox': True,
-                'show_compose_message': False }&quot;"/>
+                'show_compose_message': False
+            }&quot;"/>
             <field name="help" type="html">
                 <p>
                     No message found and no message sent yet.
index 203dcde..760972d 100644 (file)
@@ -9,12 +9,13 @@
             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_model': 'res.users',
               'default_res_id': uid,
             }</field>
             <field name="params" eval="&quot;{
                 </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>
+
+        <record id="action_mail_archives_feeds" model="ir.actions.client">
+            <field name="name">Archives</field>
+            <field name="tag">mail.wall</field>
+            <field name="context">{
+              'default_model': 'res.users',
+              'default_res_id': uid
+            }</field>
+            <field name="params" eval="&quot;{
+                'domain': [
+                    '|',
+                    ('notification_ids.partner_id.user_ids', 'in', [uid]),
+                    ('author_id.user_ids', 'in', [uid]),
+                ],
+                'show_compose_message': False,
+                'show_link': False,
+                'view_mailbox': True,
+                'read_action': 'read'
+            }&quot;"/>
+            <field name="help" type="html">
+                <p>
+                    No message found and no message sent yet.
+                </p><p>
+                    Click on the top-right icon to compose a message. This
+                    message will be sent by email if it's an internal contact.
+                </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.