Browse Source

Merge branch '9.0' of /home/iii/addons-yelizariev/../mail_sent into 9.0

pull/2/head
Ildar Nasyrov 9 years ago
parent
commit
fd5e7d4489
  1. 8
      mail_sent/README.rst
  2. 1
      mail_sent/__init__.py
  3. 15
      mail_sent/__openerp__.py
  4. 9
      mail_sent/doc/changelog.rst
  5. 50
      mail_sent/i18n/mail_sent.pot
  6. 58
      mail_sent/i18n/sl.po
  7. 28
      mail_sent/models.py
  8. BIN
      mail_sent/static/description/icon.png
  9. 47
      mail_sent/static/description/index.html
  10. BIN
      mail_sent/static/description/menu.png
  11. BIN
      mail_sent/static/description/messages.png
  12. 38
      mail_sent/views.xml

8
mail_sent/README.rst

@ -0,0 +1,8 @@
Sentbox
=======
Description: https://apps.odoo.com/apps/modules/8.0/mail_sent/
Further information and discussion: https://yelizariev.github.io/odoo/module/2015/02/19/sentbox.html
Tested on Odoo 8.0 231e02693640325c9a05fa31c680063b9e4b017b

1
mail_sent/__init__.py

@ -0,0 +1 @@
import models

15
mail_sent/__openerp__.py

@ -0,0 +1,15 @@
{
'name' : 'Sentbox',
'version' : '1.0.2',
'author' : 'IT-Projects LLC, Ivan Yelizariev',
'license': 'LGPL-3',
'category' : 'Social Network',
'website' : 'https://twitter.com/yelizariev',
'price': 9.00,
'currency': 'EUR',
'depends' : ['mail'],
'data':[
'views.xml',
],
'installable': False
}

9
mail_sent/doc/changelog.rst

@ -0,0 +1,9 @@
.. _changelog:
Changelog
=========
`1.0.2`
-------
- FIX access issue "read access error on delete"

50
mail_sent/i18n/mail_sent.pot

@ -0,0 +1,50 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_sent
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-11 06:59+0000\n"
"PO-Revision-Date: 2015-08-11 06:59+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mail_sent
#: model:ir.actions.client,help:mail_sent.action_mail_sent_feeds
msgid "<p>\n"
" No message found and no message sent yet.\n"
" </p><p>\n"
" Click on the top-right icon to compose a message. This\n"
" message will be sent by email if it's an internal contact.\n"
" </p>\n"
" "
msgstr ""
#. module: mail_sent
#: model:ir.model,name:mail_sent.model_mail_message
msgid "Message"
msgstr ""
#. module: mail_sent
#: model:ir.model,name:mail_sent.model_mail_notification
msgid "Notifications"
msgstr ""
#. module: mail_sent
#: model:ir.actions.client,name:mail_sent.action_mail_sent_feeds
#: model:ir.ui.menu,name:mail_sent.mail_sentfeeds
#: field:mail.message,sent:0
msgid "Sent"
msgstr ""
#. module: mail_sent
#: help:mail.message,sent:0
msgid "Was message sent to someone"
msgstr ""

58
mail_sent/i18n/sl.po

@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_sent
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-08-11 06:59+0000\n"
"PO-Revision-Date: 2015-08-11 09:01+0200\n"
"Last-Translator: Matjaz Mozetic <m.mozetic@matmoz.si>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: sl\n"
"X-Generator: Poedit 1.8.2\n"
#. module: mail_sent
#: model:ir.actions.client,help:mail_sent.action_mail_sent_feeds
msgid ""
"<p>\n"
" No message found and no message sent yet.\n"
" </p><p>\n"
" Click on the top-right icon to compose a message. This\n"
" message will be sent by email if it's an internal contact.\n"
" </p>\n"
" "
msgstr ""
"<p>\n"
" Nobeno sporočilo ni bilo najdeno in ni bilo še poslano.\n"
" </p><p>\n"
" Pritisnite na ikono zgoraj desno za sestavljanje sporočila. To\n"
" sporočilo bo, če gre za interni stik, poslano preko e-pošte.\n"
" </p>\n"
" "
#. module: mail_sent
#: model:ir.model,name:mail_sent.model_mail_message
msgid "Message"
msgstr "Sporočilo"
#. module: mail_sent
#: model:ir.model,name:mail_sent.model_mail_notification
msgid "Notifications"
msgstr "Obvestila"
#. module: mail_sent
#: model:ir.actions.client,name:mail_sent.action_mail_sent_feeds
#: model:ir.ui.menu,name:mail_sent.mail_sentfeeds field:mail.message,sent:0
msgid "Sent"
msgstr "Poslano"
#. module: mail_sent
#: help:mail.message,sent:0
msgid "Was message sent to someone"
msgstr "Je bilo sporočilo komu poslano"

28
mail_sent/models.py

@ -0,0 +1,28 @@
from openerp import api, models, fields
class mail_message(models.Model):
_inherit = 'mail.message'
@api.one
@api.depends('author_id', 'notified_partner_ids')
def _get_sent(self):
self_sudo = self.sudo()
self_sudo.sent = len(self_sudo.notified_partner_ids) > 1 or len(self_sudo.notified_partner_ids) == 1 and self_sudo.author_id and self_sudo.notified_partner_ids[0].id != self_sudo.author_id.id
sent = fields.Boolean('Sent', compute=_get_sent, help='Was message sent to someone', store=True)
class mail_notification(models.Model):
_inherit = 'mail.notification'
def _notify(self, cr, uid, message_id, **kwargs):
super(mail_notification, self)._notify(cr, uid, message_id, **kwargs)
self.pool['mail.message'].browse(cr, uid, message_id)._get_sent()
class mail_compose_message(models.TransientModel):
_inherit = 'mail.compose.message'
sent = fields.Boolean('Sent', help='dummy field to fix inherit error')

BIN
mail_sent/static/description/icon.png

After

Width: 100  |  Height: 100  |  Size: 2.1 KiB

47
mail_sent/static/description/index.html

@ -0,0 +1,47 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2 class="oe_slogan">Sentbox</h2>
<h3 class="oe_slogan">Quick way to check sent messages</h3>
</div>
<div class="oe_span6">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="menu.png"/>
</div>
</div>
<div class="oe_span6">
<p class="oe_mt32">
The module adds usual menu.
</p>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<p class="oe_mt32">
This menu shows messages in threads (like in other menus), but shows only sent messages.
</p>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img src="messages.png?1"/>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<h2>Need our service?</h2>
<p class="oe_mt32">Contact us by <a href="mailto:it@it-projects.info">email</a> or fill out <a href="https://www.it-projects.info/page/website.contactus " target="_blank">request form</a></p>
<ul>
<li><a href="mailto:it@it-projects.info">it@it-projects.info <i class="fa fa-envelope-o"></i></a></li>
<li><a href="https://www.it-projects.info/page/website.contactus " target="_blank">
https://www.it-projects.info/page/website.contactus <i class="fa fa-list-alt"></i></a></li>
</ul>
</div>
</div>
</section>

BIN
mail_sent/static/description/menu.png

After

Width: 217  |  Height: 167  |  Size: 5.8 KiB

BIN
mail_sent/static/description/messages.png

After

Width: 625  |  Height: 217  |  Size: 37 KiB

38
mail_sent/views.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="action_mail_sent_feeds" model="ir.actions.client">
<field name="name">Sent</field>
<field name="tag">mail.wall</field>
<field name="context">{
'default_model': 'res.users',
'default_res_id': uid,
'thread_model': 'res.partner',
'needaction_menu_ref': ['mail.mail_tomefeeds', 'mail.mail_starfeeds', 'mail.mail_inboxfeeds']
}</field>
<field name="params" eval="&quot;{
'domain': [
('author_id.user_ids', 'in', [uid]),
('sent', '=', True),
],
'view_mailbox': True,
'show_compose_message': False
}&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>
<record id="mail_sentfeeds" model="ir.ui.menu">
<field name="name">Sent</field>
<field name="sequence" eval="10"/>
<field name="action" ref="action_mail_sent_feeds"/>
<field name="parent_id" ref="mail.mail_feeds"/>
</record>
</data>
</openerp>
Loading…
Cancel
Save