Denis Mudarisov
4 years ago
No known key found for this signature in database
GPG Key ID: B9AD74DAFB7B53DA
21 changed files with
0 additions and
1796 deletions
mail_base/README.rst
mail_base/__init__.py
mail_base/__manifest__.py
mail_base/controllers/__init__.py
mail_base/controllers/main.py
mail_base/doc/changelog.rst
mail_base/doc/index.rst
mail_base/i18n/de.po
mail_base/i18n/es.po
mail_base/i18n/it.po
mail_base/i18n/pt.po
mail_base/i18n/pt_BR.po
mail_base/i18n/ru.po
mail_base/i18n/sl.po
BIN
mail_base/images/mail_base_image.png
mail_base/models.py
BIN
mail_base/static/description/icon.png
mail_base/static/lib/base.js
mail_base/tests/__init__.py
mail_base/tests/test_default.py
mail_base/views/templates.xml
@ -1,34 +0,0 @@
.. image :: https://itpp.dev/images/infinity-readme.png
:alt: Tested and maintained by IT Projects Labs
:target: https://itpp.dev
===========
Mail Base
===========
* makes built-in mail js features extendable.
* handles ``search_default_* `` parameters in context.
* fixes toggling left bar
* fixes Recipients field. Out-of-box this field could be empty.
One can say, that the module do this todo from `addons/mail/static/src/js/chat_manager.js <https://github.com/odoo/odoo/blob/9.0/addons/mail/static/src/js/chat_manager.js#L57> `__
// to do: move this to mail.utils
Note. Due to odoo restrictions, module makes mail initialization again. That is browser loads emoji and other chat data twice. This is the only way to make Mail feature extendable.
Questions?
==========
To get an assistance on this module contact us by email :arrow_right: help@itpp.dev
Contributors
============
* Pavel Romanchenko <apps@it-projects.info>
===================
Odoo Apps Store: https://apps.odoo.com/apps/modules/11.0/mail_base/
Tested on `Odoo 11.0 <https://github.com/odoo/odoo/commit/ecbf7aa4714479229658d14cce28fa00376ed390> `_
@ -1,2 +0,0 @@
from . import models
from . import controllers
@ -1,16 +0,0 @@
{
" name " : " Mail Base " ,
" summary " : """ Makes Mail extendable """ ,
" category " : " Discuss " ,
" images " : [ " images/mail_base_image.png " ] ,
" version " : " 12.0.1.0.2 " ,
" author " : " IT-Projects LLC, Pavel Romanchenko " ,
" support " : " apps@itpp.dev " ,
" website " : " https://it-projects.info " ,
" license " : " Other OSI approved licence " , # MIT
" price " : 9.00 ,
" currency " : " EUR " ,
" depends " : [ " base " , " mail " ] ,
" data " : [ " views/templates.xml " ] ,
" installable " : False ,
}
@ -1 +0,0 @@
from . import main
@ -1,15 +0,0 @@
from odoo.http import request
from odoo.addons.bus.controllers.main import BusController
class MailChatController ( BusController ) :
# -----------------------------
# Extends BUS Controller Poll
# -----------------------------
def _poll ( self , dbname , channels , last , options ) :
if request . session . uid :
channels . append ( ( request . db , " mail_base.mail_sent " ) )
return super ( MailChatController , self ) . _poll ( dbname , channels , last , options )
@ -1,22 +0,0 @@
`1.0.4`
-------
**FIX** : issue related to clear cache
`1.0.3`
-------
**FIX** : error on clicking messages preview after sending new message
`1.0.2`
-------
- **FIX** : fixed an error with unsubscribing from channel or closing dialog window
`1.0.1`
-------
- **FIX** : clear messages cache on sending message via Mail Composer. Otherwise Sent, Arhives menus will have new message until user refresh whole web page
`1.0.0`
-------
- Init version
@ -1,18 +0,0 @@
=========================
Mail Base
=========================
Installation
============
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html> `__ this module in a usual way
Configuration
=============
This module does not require special configuration.
Usage
=====
* To use this module you need either install module that depends on it or create new module.
@ -1,31 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Dawid Runowski <dawrun@outlook.com>, 2019
# Ermin Trevisan <trevi@twanda.com>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-05 23:09+0000\n"
"PO-Revision-Date: 2017-11-28 13:59+0000\n"
"Last-Translator: Ermin Trevisan <trevi@twanda.com>, 2019\n"
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Assistent für die Email-Gestaltung"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Nachricht"
@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Randall Castro <rcastro@treintaycinco.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-21 23:07+0000\n"
"PO-Revision-Date: 2018-04-21 23:07+0000\n"
"Last-Translator: Randall Castro <rcastro@treintaycinco.com>, 2018\n"
"Language-Team: Spanish (https://www.transifex.com/it-projects-llc/teams/76080/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Asistente para composición de correo"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Mensaje"
@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-17 20:20+0000\n"
"PO-Revision-Date: 2017-07-17 20:20+0000\n"
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2017\n"
"Language-Team: Italian (https://www.transifex.com/it-projects-llc/teams/76080/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Componi Email"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Messaggio"
@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-21 00:05+0000\n"
"PO-Revision-Date: 2018-04-21 00:05+0000\n"
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2018\n"
"Language-Team: Portuguese (https://www.transifex.com/it-projects-llc/teams/76080/pt/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Assistente de composição de Email"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Mensagem"
@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-21 00:05+0000\n"
"PO-Revision-Date: 2018-04-21 00:05+0000\n"
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2018\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/it-projects-llc/teams/76080/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Assistente de Composição de Email"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Mensagem"
@ -1,29 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Ivan Yelizariev <yelizariev@it-projects.info>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-28 14:34+0000\n"
"PO-Revision-Date: 2017-07-28 14:34+0000\n"
"Last-Translator: Ivan Yelizariev <yelizariev@it-projects.info>, 2017\n"
"Language-Team: Russian (https://www.transifex.com/it-projects-llc/teams/76080/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ru\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Сообщение"
@ -1,31 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_base
#
# Translators:
# Translation Bot <i18n-bot@it-projects.info>, 2017
# Matjaz Mozetic <m.mozetic@matmoz.si>, 2019
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-05-05 23:09+0000\n"
"PO-Revision-Date: 2017-11-28 13:59+0000\n"
"Last-Translator: Matjaz Mozetic <m.mozetic@matmoz.si>, 2019\n"
"Language-Team: Slovenian (https://www.transifex.com/it-projects-llc/teams/76080/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_compose_message
msgid "Email composition wizard"
msgstr "Čarovnik za sestavljanje sporočil"
#. module: mail_base
#: model:ir.model,name:mail_base.model_mail_message
msgid "Message"
msgstr "Sporočilo"
Width: 750
|
Height: 371
|
Size: 177 KiB
@ -1,31 +0,0 @@
from odoo import api , models
class MailMessage ( models . Model ) :
_inherit = " mail.message "
@api.multi
def write ( self , values ) :
if values . get ( " needaction_partner_ids " ) :
if not values . get ( " partner_ids " ) :
values [ " partner_ids " ] = [ ]
for triplet in values . get ( " needaction_partner_ids " ) :
if triplet [ 0 ] == 6 :
for i in triplet [ 2 ] :
values [ " partner_ids " ] . append ( ( 4 , i , False ) )
return super ( MailMessage , self ) . write ( values )
class MailComposer ( models . TransientModel ) :
_inherit = " mail.compose.message "
@api.multi
def send_mail ( self , auto_commit = False ) :
res = super ( MailComposer , self ) . send_mail ( auto_commit = auto_commit )
notification = { }
self . env [ " bus.bus " ] . sendone (
( self . _cr . dbname , " mail_base.mail_sent " ) , notification
)
return res
Width: 100
|
Height: 100
|
Size: 2.1 KiB
@ -1 +0,0 @@
from . import test_default
@ -1,17 +0,0 @@
import odoo.tests
@odoo.tests.common.at_install ( False )
@odoo.tests.common.post_install ( True )
class TestUi ( odoo . tests . HttpCase ) :
def test_01_mail_base ( self ) :
# wait till page loaded
code = """
setTimeout ( function ( ) {
console . log ( ' ok ' ) ;
} , 1000 ) ;
"""
link = " /web#action= %s " % self . ref ( " mail.mail_channel_action_client_chat " )
self . phantom_js (
link , code , " odoo.__DEBUG__.services[ ' mail_base.base ' ] " , login = " admin "
)
@ -1,14 +0,0 @@
<?xml version="1.0" ?>
<openerp >
<data >
<template
id="mail_base_assets_backend"
name="mail_base_assets_backend"
inherit_id="web.assets_backend"
>
<xpath expr= "." position= "inside" >
<script src= "/mail_base/static/lib/base.js" type= "text/javascript" />
</xpath>
</template>
</data>
</openerp>