-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b06246
commit d78b311
Showing
7 changed files
with
132 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<openerp> | ||
<data> | ||
<record id="view_waiting_mail_tree" model="ir.ui.view"> | ||
<field name="name">waiting mail tree</field> | ||
<field name="model">mail.mail</field> | ||
<field name="inherit_id" ref="mail.view_mail_tree"/> | ||
<field name="arch" type="xml"> | ||
<field name="author_id" position="after"> | ||
<field name="email_to"/> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_waiting_mail_form" model="ir.ui.view"> | ||
<record id="view_mail_message_form_waiting" model="ir.ui.view"> | ||
<field name="name">waiting mail form</field> | ||
<field name="model">mail.mail</field> | ||
<field name="inherit_id" ref="mail.view_mail_form"/> | ||
<field name="model">mail.message</field> | ||
<field name="inherit_id" ref="mail.view_message_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="body_html" position="after"> | ||
<button name="confirm_mail" string="Confirm Mail" type="object" class="oe_highlight" attrs="{'invisible':[('state','!=','waiting')]}"/> | ||
<field name="body" position="after"> | ||
<newline/> | ||
<button name="confirm_mail" string="Confirm Mail" type="object" class="oe_highlight" attrs="{'invisible':[('type','!=','waiting')]}"/> | ||
</field> | ||
</field> | ||
</record> | ||
<record id="view_waiting_mail_search" model="ir.ui.view" > | ||
|
||
<record id="view_mail_message_search_waiting" model="ir.ui.view"> | ||
<field name="name">waiting mail search</field> | ||
<field name="model">mail.mail</field> | ||
<field name="model">mail.message</field> | ||
<field name="inherit_id" ref="mail.view_message_search"/> | ||
<field name="arch" type="xml"> | ||
<search string="Email Search"> | ||
<field name="email_from" filter_domain="['|' '|',('email_from','ilike',self), ('email_to','ilike',self), ('subject','ilike',self)]" string="Email"/> | ||
<field name="date"/> | ||
<filter icon="terp-camera_test" name="received" string="Received" domain="[('state','=','received')]"/> | ||
<filter icon="terp-call-start" name="outgoing" string="Outgoing" domain="[('state','=','outgoing')]"/> | ||
<filter icon="terp-check" name="sent" string="Sent" domain="[('state','=','sent')]"/> | ||
<filter icon="terp-gtk-stop" name="exception" string="Failed" domain="[('state','=','exception')]"/> | ||
<filter name="waiting" string="Waiting Confirmation" domain="[('state','=','waiting')]"/> | ||
<separator/> | ||
<filter icon="terp-camera_test" name="type_email" string="Email" domain="[('type','=','email')]"/> | ||
<filter icon="terp-camera_test" name="type_comment" string="Comment" domain="[('type','=','comment')]"/> | ||
<filter icon="terp-camera_test" name="type_notification" string="Notification" domain="[('type','=','notification')]"/> | ||
<group expand="0" string="Extended Filters..."> | ||
<field name="author_id"/> | ||
<field name="partner_ids"/> | ||
<field name="model"/> | ||
<field name="res_id"/> | ||
</group> | ||
<group expand="0" string="Group By..."> | ||
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/> | ||
<filter string="Author" name="author" context="{'group_by':'author_id'}"/> | ||
<filter string="Thread" name="thread" domain="[]" context="{'group_by':'message_id'}"/> | ||
<filter string="Month" name="month" help="Creation Month" domain="[]" context="{'group_by':'date'}"/> | ||
</group> | ||
</search> | ||
<filter name="emails" position="after"> | ||
<filter string="Waiting Emails" name="waiting" domain="[('type', '=', 'waiting')]"/> | ||
</filter> | ||
</field> | ||
</record> | ||
|
||
|
||
<record id="action_view_waiting_mail" model="ir.actions.act_window"> | ||
<field name="name">Waiting Mail</field> | ||
<field name="res_model">mail.mail</field> | ||
<field name="res_model">mail.message</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="context">{'search_default_waiting': 1, 'search_default_type_email': 1}</field> | ||
<field name="search_view_id" ref="view_waiting_mail_search"/> | ||
<field name="context">{'search_default_waiting': 1}</field> | ||
<field name="search_view_id" ref="view_mail_message_search_waiting"/> | ||
</record> | ||
|
||
<menuitem name="Waiting Emails" id="menu_waiting_mail" parent="mail.mail_feeds" sequence="40" action="action_view_waiting_mail" /> | ||
|
||
</data> | ||
</openerp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
################################################################################# | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012 Julius Network Solutions SARL <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
################################################################################# | ||
|
||
import mail_confirmation | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<record id="view_confirm_waiting_mail_form" model="ir.ui.view"> | ||
<field name="name">confirm.mail.message.form</field> | ||
<field name="model">confirm.mail.message</field> | ||
<field name="arch" type="xml"> | ||
<form string="Confirm selected Mails" version="7.0"> | ||
<header> | ||
<button string="Confirm Mails" name="confirm_mails" type="object" class="oe_highlight"/> | ||
or | ||
<button string="Cancel" class="oe_link" special="cancel"/> | ||
</header> | ||
</form> | ||
</field> | ||
</record> | ||
|
||
<record id="action_confirm_waiting_mail" model="ir.actions.act_window"> | ||
<field name="name">Confirm Waiting Mails</field> | ||
<field name="res_model">confirm.mail.message</field> | ||
<field name="view_type">form</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="view_id" ref="view_confirm_waiting_mail_form"/> | ||
<field name="target">new</field> | ||
</record> | ||
|
||
<record model="ir.values" id="confirm_waiting_mail"> | ||
<field name="model_id" ref="mail.model_mail_message" /> | ||
<field name="name">Confirm Mail</field> | ||
<field name="key2">client_action_multi</field> | ||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_confirm_waiting_mail'))" /> | ||
<field name="key">action</field> | ||
<field name="model">mail.message</field> | ||
</record> | ||
|
||
</data> | ||
</openerp> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -*- coding: utf-8 -*- | ||
################################################################################# | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2012 Julius Network Solutions SARL <[email protected]> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
################################################################################# | ||
|
||
from openerp.osv import fields, orm | ||
from openerp.tools.translate import _ | ||
|
||
class confirm_mail_message(orm.TransientModel): | ||
_name = "confirm.mail.message" | ||
|
||
def confirm_mails(self, cr, uid, ids, context=None): | ||
if context is None: | ||
context = {} | ||
self.pool.get('mail.message').confirm_mail(cr, uid, context.get(('active_ids'), []), context=context) | ||
return {'type': 'ir.actions.act_window_close',} | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |