summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>2013-02-25 19:17:47 +0100
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>2013-02-25 19:17:47 +0100
commitf0345c8380d5821bf2c7493d5cbdf514b460832c (patch)
tree2995d56e08a55a4f34b10e4f9975deddc5457ac9
parent27eea7c0e284d5d818578da5257826bdaed390d5 (diff)
parentf1a4d9de04dfdbee05d58fdc1c36646e127af7f4 (diff)
[MERGE] added menuitems for portal user to check their 'TODO' messages list and their 'Archives'
bzr revid: qdp-launchpad@openerp.com-20130225181747-c4ixcb40t3g5mv0i
-rw-r--r--addons/mail/mail_thread_view.xml21
-rw-r--r--addons/portal/portal_view.xml63
2 files changed, 74 insertions, 10 deletions
diff --git a/addons/mail/mail_thread_view.xml b/addons/mail/mail_thread_view.xml
index 6769fb0d063..75c86e4645d 100644
--- a/addons/mail/mail_thread_view.xml
+++ b/addons/mail/mail_thread_view.xml
@@ -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.
diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml
index 203dcde90c7..760972da881 100644
--- a/addons/portal/portal_view.xml
+++ b/addons/portal/portal_view.xml
@@ -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;{
@@ -38,8 +39,68 @@
</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.