Compare commits
No commits in common. '14.0' and '10.0' have entirely different histories.
-
2.DINAR/build-date.txt
-
4.DINAR/config.yaml
-
1.DINAR/image/dependencies/pip.txt
-
27.DINAR/image/src/addons.yaml
-
2.github/FUNDING.yml
-
19.github/workflows/main.yml
-
91.gitignore
-
3.isort.cfg
-
12.pre-commit-config.yaml
-
5.pylintrc
-
4.pylintrc-mandatory
-
50.travis.yml
-
23LICENSE
-
27README.md
-
17mail_all/README.rst
-
3mail_all/__init__.py
-
19mail_all/__manifest__.py
-
7mail_all/doc/changelog.rst
-
9mail_all/doc/index.rst
-
36mail_all/i18n/de.po
-
35mail_all/i18n/es.po
-
30mail_all/i18n/mail_all.pot
-
37mail_all/i18n/sl.po
-
BINmail_all/images/1.jpg
-
0mail_all/models/__init__.py
-
BINmail_all/static/description/1.png
-
BINmail_all/static/description/2.png
-
BINmail_all/static/description/icon.png
-
82mail_all/static/description/index.html
-
60mail_all/static/src/js/mail_all.js
-
24mail_all/static/src/xml/menu.xml
-
3mail_all/tests/__init__.py
-
19mail_all/tests/test_js.py
-
17mail_all/views/templates.xml
-
19mail_archives/README.rst
-
0mail_archives/__init__.py
-
16mail_archives/__manifest__.py
-
36mail_archives/i18n/de.po
-
35mail_archives/i18n/es.po
-
30mail_archives/i18n/mail_archives.pot
-
37mail_archives/i18n/sl.po
-
BINmail_archives/images/1.jpg
-
BINmail_archives/static/description/1.png
-
BINmail_archives/static/description/2.png
-
BINmail_archives/static/description/icon.png
-
82mail_archives/static/description/index.html
-
85mail_archives/static/src/js/archives.js
-
24mail_archives/static/src/xml/menu.xml
-
3mail_archives/tests/__init__.py
-
22mail_archives/tests/test_js.py
-
17mail_archives/views/templates.xml
-
29mail_attachment_popup/README.rst
-
0mail_attachment_popup/__init__.py
-
18mail_attachment_popup/__manifest__.py
-
4mail_attachment_popup/doc/changelog.rst
-
16mail_attachment_popup/doc/index.rst
-
28mail_attachment_popup/i18n/de.po
-
27mail_attachment_popup/i18n/es.po
-
22mail_attachment_popup/i18n/mail_attachment_popup.pot
-
29mail_attachment_popup/i18n/ru.po
-
BINmail_attachment_popup/images/popup_image.png
-
BINmail_attachment_popup/static/description/attach_image.png
-
BINmail_attachment_popup/static/description/download.png
-
BINmail_attachment_popup/static/description/icon.png
-
84mail_attachment_popup/static/description/index.html
-
BINmail_attachment_popup/static/description/popup.png
-
429mail_attachment_popup/static/lib/js/jquery.arcticmodal.js
-
43mail_attachment_popup/static/src/css/jquery.arcticmodal.css
-
21mail_attachment_popup/static/src/css/simple.css
-
16mail_attachment_popup/static/src/css/styles.css
-
BINmail_attachment_popup/static/src/img/loading.gif
-
65mail_attachment_popup/static/src/xml/mail_attachment_popup.xml
-
29mail_attachment_popup/views/mail_attachment_popup_template.xml
-
26mail_base/README.rst
-
5mail_base/__init__.py
-
19mail_base/__manifest__.py
-
2mail_base/controllers/__init__.py
-
19mail_base/controllers/main.py
-
30mail_base/doc/changelog.rst
-
4mail_base/doc/index.rst
-
31mail_base/i18n/de.po
-
30mail_base/i18n/es.po
-
30mail_base/i18n/it.po
-
25mail_base/i18n/mail_base.pot
-
30mail_base/i18n/pt.po
-
30mail_base/i18n/pt_BR.po
-
32mail_base/i18n/ru.po
-
33mail_base/i18n/sl.po
-
BINmail_base/images/mail_base_image.png
-
36mail_base/models.py
-
BINmail_base/static/description/icon.png
-
1468mail_base/static/lib/base.js
-
14mail_base/views/templates.xml
-
12mail_move_message/README.rst
-
3mail_move_message/__init__.py
-
15mail_move_message/__manifest__.py
-
2mail_move_message/controllers/__init__.py
-
70mail_move_message/controllers/main.py
-
9mail_move_message/data/mail_move_message_data.xml
-
31mail_move_message/doc/changelog.rst
@ -1 +1 @@ |
|||
new repo readme files |
|||
April 3, 2020 |
@ -1,2 +1 @@ |
|||
# Python dependencies |
|||
pycryptodome |
@ -1 +1,28 @@ |
|||
# see https://github.com/Tecnativa/doodba#optodoocustomsrcaddonsyaml |
|||
--- |
|||
ENV: |
|||
DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git |
|||
|
|||
web: |
|||
- "*" |
|||
|
|||
--- |
|||
ENV: |
|||
DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git |
|||
|
|||
access-addons: |
|||
- "*" |
|||
|
|||
--- |
|||
ENV: |
|||
DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git |
|||
|
|||
misc-addons: |
|||
- "*" |
|||
|
|||
--- |
|||
ENV: |
|||
DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git |
|||
|
|||
website-addons: |
|||
- "*" |
@ -1,2 +0,0 @@ |
|||
ko_fi: itprojectsllc # This is supposed to bring some coffee for us |
|||
patreon: itpp # become our patron |
@ -1,19 +0,0 @@ |
|||
name: Telegram Notifications |
|||
|
|||
on: |
|||
issues: |
|||
types: [opened, reopened, deleted, closed] |
|||
|
|||
jobs: |
|||
notify: |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- name: Send notifications to Telegram |
|||
run: |
|||
curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN |
|||
}}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d text="${MESSAGE}" |
|||
>> /dev/null |
|||
env: |
|||
MESSAGE: |
|||
"Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}" |
@ -0,0 +1,91 @@ |
|||
# Byte-compiled / optimized / DLL files |
|||
__pycache__/ |
|||
*.py[cod] |
|||
*$py.class |
|||
|
|||
# C extensions |
|||
*.so |
|||
|
|||
# Distribution / packaging |
|||
.Python |
|||
env/ |
|||
build/ |
|||
develop-eggs/ |
|||
dist/ |
|||
downloads/ |
|||
eggs/ |
|||
.eggs/ |
|||
lib/ |
|||
lib64/ |
|||
parts/ |
|||
sdist/ |
|||
var/ |
|||
*.egg-info/ |
|||
.installed.cfg |
|||
*.egg |
|||
*.pyc |
|||
*~ |
|||
|
|||
# PyInstaller |
|||
# Usually these files are written by a python script from a template |
|||
# before PyInstaller builds the exe, so as to inject date/other infos into it. |
|||
*.manifest |
|||
*.spec |
|||
|
|||
# Installer logs |
|||
pip-log.txt |
|||
pip-delete-this-directory.txt |
|||
|
|||
# Unit test / coverage reports |
|||
htmlcov/ |
|||
.tox/ |
|||
.coverage |
|||
.coverage.* |
|||
.cache |
|||
nosetests.xml |
|||
coverage.xml |
|||
*,cover |
|||
.hypothesis/ |
|||
|
|||
# Translations |
|||
*.mo |
|||
*.pot |
|||
|
|||
# Django stuff: |
|||
*.log |
|||
local_settings.py |
|||
|
|||
# Flask stuff: |
|||
instance/ |
|||
.webassets-cache |
|||
|
|||
# Scrapy stuff: |
|||
.scrapy |
|||
|
|||
# Sphinx documentation |
|||
docs/_build/ |
|||
|
|||
# PyBuilder |
|||
target/ |
|||
|
|||
# IPython Notebook |
|||
.ipynb_checkpoints |
|||
|
|||
# pyenv |
|||
.python-version |
|||
|
|||
# celery beat schedule file |
|||
celerybeat-schedule |
|||
|
|||
# dotenv |
|||
.env |
|||
|
|||
# virtualenv |
|||
venv/ |
|||
ENV/ |
|||
|
|||
# Spyder project settings |
|||
.spyderproject |
|||
|
|||
# Rope project settings |
|||
.ropeproject |
@ -0,0 +1,50 @@ |
|||
language: python |
|||
|
|||
python: |
|||
- "2.7" |
|||
|
|||
#dist: trusty |
|||
sudo: false |
|||
cache: pip |
|||
|
|||
addons: |
|||
postgresql: "9.5" |
|||
apt: |
|||
packages: |
|||
- expect-dev # provides unbuffer utility |
|||
- python-lxml # because pip installation is slow |
|||
|
|||
env: |
|||
global: |
|||
- VERSION="10.0" TESTS="0" LINT_CHECK="0" UNIT_TEST="0" |
|||
- PYLINT_ODOO_JSLINTRC="/home/travis/maintainer-quality-tools/travis/cfg/.jslintrc" |
|||
|
|||
matrix: |
|||
- LINT_CHECK="1" |
|||
- CHECK_TAGS="1" |
|||
- TESTS="1" ODOO_REPO="odoo/odoo" |
|||
- MAKEPOT="1" |
|||
- TESTS="1" ODOO_REPO="OCA/OCB" |
|||
|
|||
virtualenv: |
|||
system_site_packages: true |
|||
|
|||
install: |
|||
- pip install anybox.testing.openerp |
|||
- git clone https://github.com/it-projects-llc/maintainer-quality-tools.git |
|||
${HOME}/maintainer-quality-tools |
|||
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} |
|||
- travis_install_nightly |
|||
|
|||
script: |
|||
- travis_run_tests |
|||
|
|||
after_success: |
|||
- travis_after_tests_success |
|||
|
|||
notifications: |
|||
email: false |
|||
webhooks: |
|||
on_failure: change |
|||
urls: |
|||
- "https://ci.it-projects.info/travis/on_failure/change" |
@ -0,0 +1,23 @@ |
|||
The MIT License (MIT) |
|||
|
|||
Copyright 2020 IT-Projects Labs |
|||
Copyright 2015-2020 IT-Projects LLC |
|||
Copyright 2014-2015 Ivan Yelizariev |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in |
|||
all copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|||
THE SOFTWARE. |
@ -0,0 +1,17 @@ |
|||
.. image:: https://itpp.dev/images/infinity-readme.png |
|||
:alt: Tested and maintained by IT Projects Labs |
|||
:target: https://itpp.dev |
|||
|
|||
=================== |
|||
Show all messages |
|||
=================== |
|||
|
|||
Adds ``Discuss / All`` menu, that shows all messages accesable by current user |
|||
|
|||
Further information |
|||
------------------- |
|||
|
|||
Odoo Apps Store: https://apps.odoo.com/apps/modules/9.0/mail_all/ |
|||
|
|||
|
|||
Tested on `Odoo 9.0 <https://github.com/odoo/odoo/commit/d3dd4161ad0598ebaa659fbd083457c77aa9448d>`_ |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import models |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
{ |
|||
"name": "Show all messages", |
|||
"summary": """Checkout all messages where you have access""", |
|||
"category": "Discuss", |
|||
"images": ["images/1.jpg"], |
|||
"version": "10.0.1.0.0", |
|||
"author": "IT-Projects LLC, Pavel Romanchenko", |
|||
"support": "apps@itpp.dev", |
|||
"website": "https://twitter.com/OdooFree", |
|||
"license": "Other OSI approved licence", # MIT |
|||
"depends": ["mail_base"], |
|||
"external_dependencies": {"python": [], "bin": []}, |
|||
"data": ["views/templates.xml"], |
|||
"qweb": ["static/src/xml/menu.xml"], |
|||
"demo": [], |
|||
"installable": True, |
|||
"auto_install": False, |
|||
} |
@ -0,0 +1,7 @@ |
|||
Updates |
|||
======= |
|||
|
|||
`1.0.0` |
|||
------- |
|||
|
|||
- Init version |
@ -0,0 +1,9 @@ |
|||
=================== |
|||
Show all messages |
|||
=================== |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
* Open menu ``Discuss / All messages`` |
|||
* You see all messages |
@ -0,0 +1,36 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_all |
|||
# |
|||
# Translators: |
|||
# Dawid Runowski <dawrun@outlook.com>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+0000\n" |
|||
"Last-Translator: Dawid Runowski <dawrun@outlook.com>, 2019\n" |
|||
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/" |
|||
"de/)\n" |
|||
"Language: de\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/js/mail_all.js:56 |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "All messages" |
|||
msgstr "Alle Nachrichten" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "No messages" |
|||
msgstr "Alle Nachrichten" |
@ -0,0 +1,35 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_all |
|||
# |
|||
# Translators: |
|||
# Randall Castro <rcastro@treintaycinco.com>, 2018 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-12-19 16:49+0000\n" |
|||
"PO-Revision-Date: 2017-12-19 16:49+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" |
|||
"Language: es\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/js/mail_all.js:56 |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "All messages" |
|||
msgstr "Todos los mensajes" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "No messages" |
|||
msgstr "Sin mensajes" |
@ -0,0 +1,30 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_all |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \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_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/js/mail_all.js:52 |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:12 |
|||
#, python-format |
|||
msgid "All messages" |
|||
msgstr "" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:20 |
|||
#, python-format |
|||
msgid "No messages" |
|||
msgstr "" |
|||
|
@ -0,0 +1,37 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_all |
|||
# |
|||
# Translators: |
|||
# Matjaz Mozetic <m.mozetic@matmoz.si>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+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" |
|||
"Language: sl\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/js/mail_all.js:56 |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "All messages" |
|||
msgstr "Vsa sporočila" |
|||
|
|||
#. module: mail_all |
|||
#. openerp-web |
|||
#: code:addons/mail_all/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "No messages" |
|||
msgstr "Ni sporočil" |
After Width: 334 | Height: 171 | Size: 11 KiB |
After Width: 300 | Height: 270 | Size: 15 KiB |
After Width: 765 | Height: 400 | Size: 22 KiB |
After Width: 100 | Height: 100 | Size: 2.1 KiB |
@ -0,0 +1,82 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">Show all messages</h2> |
|||
<h3 class="oe_slogan">Checkout all messages where you have access</h3> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="1.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 all messages. |
|||
</p> |
|||
</div> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="2.png"/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span8"> |
|||
<h2>Need our service?</h2> |
|||
<p class="oe_mt32">Contact us by <a href="mailto:apps@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:apps@it-projects.info">apps@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 class="oe_span4"> |
|||
<div class="stamp" style="width:200px;"> |
|||
<div style="margin-top: 15px; |
|||
position: relative; |
|||
font-family:'Vollkorn', serif; |
|||
font-size: 16px; |
|||
line-height: 25px; |
|||
text-transform: uppercase; |
|||
font-weight: bold; |
|||
color: #75526b; |
|||
border: 3px dashed #75526b; |
|||
float: left; |
|||
padding: 4px 12px; |
|||
-webkit-transform: rotate(6deg); |
|||
-o-transform: rotate(6deg); |
|||
-moz-transform: rotate(6deg); |
|||
-ms-transform: rotate(6deg);"> |
|||
Tested on Odoo<br/>10.0 community |
|||
</div> |
|||
<div style="margin-top: 15px; |
|||
position: relative; |
|||
font-family:'Vollkorn', serif; |
|||
font-size: 16px; |
|||
line-height: 25px; |
|||
text-transform: uppercase; |
|||
font-weight: bold; |
|||
color: #75526b; |
|||
border: 3px dashed #75526b; |
|||
float: left; |
|||
padding: 4px 12px; |
|||
-webkit-transform: rotate(-3deg); |
|||
-o-transform: rotate(-3deg); |
|||
-moz-transform: rotate(-3deg); |
|||
-ms-transform: rotate(-3deg);"> |
|||
Tested on Odoo<br/>10.0 enterprise |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,60 @@ |
|||
odoo.define("mail_all.all", function(require) { |
|||
"use strict"; |
|||
|
|||
var base_obj = require("mail_base.base"); |
|||
|
|||
// -------------------------------------------------------------------------------
|
|||
var core = require("web.core"); |
|||
|
|||
var _lt = core._lt; |
|||
// -------------------------------------------------------------------------------
|
|||
|
|||
var ChatAction = core.action_registry.get("mail.chat.instant_messaging"); |
|||
ChatAction.include({ |
|||
get_thread_rendering_options: function(messages) { |
|||
var options = this._super.apply(this, arguments); |
|||
options.display_subject = |
|||
options.display_subject || this.channel.id === "channel_all"; |
|||
return options; |
|||
}, |
|||
}); |
|||
|
|||
// Inherit class and override methods
|
|||
base_obj.MailTools.include({ |
|||
get_properties: function(msg) { |
|||
var properties = this._super.apply(this, arguments); |
|||
properties.is_all = this.property_descr("channel_all", msg, this); |
|||
return properties; |
|||
}, |
|||
|
|||
set_channel_flags: function(data, msg) { |
|||
this._super.apply(this, arguments); |
|||
msg.is_all = data.author_id !== "ODOOBOT"; |
|||
return msg; |
|||
}, |
|||
|
|||
get_channel_array: function(msg) { |
|||
var arr = this._super.apply(this, arguments); |
|||
return arr.concat("channel_all"); |
|||
}, |
|||
|
|||
get_domain: function(channel) { |
|||
return channel.id === "channel_all" |
|||
? [] |
|||
: this._super.apply(this, arguments); |
|||
}, |
|||
}); |
|||
|
|||
base_obj.chat_manager.is_ready.then(function() { |
|||
// Add all channel
|
|||
base_obj.chat_manager.mail_tools.add_channel({ |
|||
id: "channel_all", |
|||
name: _lt("All messages"), |
|||
type: "static", |
|||
}); |
|||
|
|||
return $.when(); |
|||
}); |
|||
|
|||
return base_obj.chat_manager; |
|||
}); |
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<template> |
|||
<!--Inherit Sidebar and add All messages menu item after Starred --> |
|||
<t t-extend="mail.chat.Sidebar"> |
|||
<t t-jquery="div[data-channel-id=channel_starred]" t-operation="after"> |
|||
<div |
|||
t-attf-class="o_mail_chat_channel_item #{(active_channel_id == 'channel_all') ? 'o_active': ''}" |
|||
data-channel-id="channel_all" |
|||
> |
|||
<span class="o_channel_name mail_all"> <i |
|||
class="fa fa-database" |
|||
/> All messages </span> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<!--Add message about empty all messages page--> |
|||
<t t-extend="mail.EmptyChannel"> |
|||
<t t-jquery="t:last-child" t-operation="after"> |
|||
<t t-if="options.channel_id==='channel_all'"> |
|||
<div class="o_thread_title">No messages</div> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import test_js |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
import odoo.tests |
|||
|
|||
|
|||
@odoo.tests.common.at_install(False) |
|||
@odoo.tests.common.post_install(True) |
|||
class TestUi(odoo.tests.HttpCase): |
|||
def test_01_mail_all(self): |
|||
# wait till page loaded and then click and wait again |
|||
code = """ |
|||
setTimeout(function () { |
|||
$(".mail_all").click(); |
|||
setTimeout(function () {console.log('ok');}, 3000); |
|||
}, 1000); |
|||
""" |
|||
link = "/web#action=%s" % self.ref("mail.mail_channel_action_client_chat") |
|||
self.phantom_js( |
|||
link, code, "odoo.__DEBUG__.services['mail_all.all']", login="admin" |
|||
) |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" ?> |
|||
<openerp> |
|||
<data> |
|||
<template |
|||
id="mail_all_assets_backend" |
|||
name="mail_all_assets_backend" |
|||
inherit_id="web.assets_backend" |
|||
> |
|||
<xpath expr="." position="inside"> |
|||
<script |
|||
src="/mail_all/static/src/js/mail_all.js" |
|||
type="text/javascript" |
|||
/> |
|||
</xpath> |
|||
</template> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,19 @@ |
|||
.. image:: https://itpp.dev/images/infinity-readme.png |
|||
:alt: Tested and maintained by IT Projects Labs |
|||
:target: https://itpp.dev |
|||
|
|||
Mail Archives |
|||
============= |
|||
|
|||
Adds Archive menu, which shows sent/received messages |
|||
|
|||
Usage |
|||
----- |
|||
Click Discuss/Archive menu -- sent/received messages are displayed |
|||
|
|||
Further information |
|||
------------------- |
|||
|
|||
Odoo Apps Store: https://apps.odoo.com/apps/modules/9.0/mail_archives/ |
|||
|
|||
Tested on `Odoo 9.0 <https://github.com/odoo/odoo/commit/b9f206953e3f877adf18643f154d1262842564ee>`_ |
@ -0,0 +1,16 @@ |
|||
# -*- coding: utf-8 -*- |
|||
{ |
|||
"name": "Mail archives", |
|||
"summary": """Adds menu to find old messages""", |
|||
"category": "Discuss", |
|||
"images": ["images/1.jpg"], |
|||
"version": "10.0.1.0.0", |
|||
"author": "IT-Projects LLC, Pavel Romanchenko", |
|||
"support": "apps@itpp.dev", |
|||
"website": "https://twitter.com/OdooFree", |
|||
"license": "Other OSI approved licence", # MIT |
|||
"depends": ["mail_base"], |
|||
"data": ["views/templates.xml"], |
|||
"qweb": ["static/src/xml/menu.xml"], |
|||
"installable": True, |
|||
} |
@ -0,0 +1,36 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_archives |
|||
# |
|||
# Translators: |
|||
# Dawid Runowski <dawrun@outlook.com>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+0000\n" |
|||
"Last-Translator: Dawid Runowski <dawrun@outlook.com>, 2019\n" |
|||
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/" |
|||
"de/)\n" |
|||
"Language: de\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/js/archives.js:76 |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "Archive" |
|||
msgstr "Archiv" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "Archive is empty" |
|||
msgstr "Archiv ist leer" |
@ -0,0 +1,35 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_archives |
|||
# |
|||
# Translators: |
|||
# Randall Castro <rcastro@treintaycinco.com>, 2018 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-12-19 16:49+0000\n" |
|||
"PO-Revision-Date: 2017-12-19 16:49+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" |
|||
"Language: es\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/js/archives.js:76 |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "Archive" |
|||
msgstr "Archivo" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "Archive is empty" |
|||
msgstr "El archivo está vacío" |
@ -0,0 +1,30 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_archives |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \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_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/js/archives.js:77 |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:12 |
|||
#, python-format |
|||
msgid "Archive" |
|||
msgstr "" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:20 |
|||
#, python-format |
|||
msgid "Archive is empty" |
|||
msgstr "" |
|||
|
@ -0,0 +1,37 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_archives |
|||
# |
|||
# Translators: |
|||
# Matjaz Mozetic <m.mozetic@matmoz.si>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+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" |
|||
"Language: sl\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/js/archives.js:76 |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:7 |
|||
#, python-format |
|||
msgid "Archive" |
|||
msgstr "Arhiv" |
|||
|
|||
#. module: mail_archives |
|||
#. openerp-web |
|||
#: code:addons/mail_archives/static/src/xml/menu.xml:15 |
|||
#, python-format |
|||
msgid "Archive is empty" |
|||
msgstr "Arhiv je prazen" |
After Width: 334 | Height: 171 | Size: 18 KiB |
After Width: 300 | Height: 270 | Size: 24 KiB |
After Width: 765 | Height: 400 | Size: 40 KiB |
After Width: 100 | Height: 100 | Size: 2.1 KiB |
@ -0,0 +1,82 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">Look up old mails</h2> |
|||
<h3 class="oe_slogan">Browse archived mails like in odoo 8</h3> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="1.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 archive messages, i.e. ones you sent or received. |
|||
</p> |
|||
</div> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_picture oe_screenshot" src="2.png"/> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span8"> |
|||
<h2>Need our service?</h2> |
|||
<p class="oe_mt32">Contact us by <a href="mailto:apps@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:apps@it-projects.info">apps@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 class="oe_span4"> |
|||
<div class="stamp" style="width:200px;"> |
|||
<div style="margin-top: 15px; |
|||
position: relative; |
|||
font-family:'Vollkorn', serif; |
|||
font-size: 16px; |
|||
line-height: 25px; |
|||
text-transform: uppercase; |
|||
font-weight: bold; |
|||
color: #75526b; |
|||
border: 3px dashed #75526b; |
|||
float: left; |
|||
padding: 4px 12px; |
|||
-webkit-transform: rotate(6deg); |
|||
-o-transform: rotate(6deg); |
|||
-moz-transform: rotate(6deg); |
|||
-ms-transform: rotate(6deg);"> |
|||
Tested on Odoo<br/>10.0 community |
|||
</div> |
|||
<div style="margin-top: 15px; |
|||
position: relative; |
|||
font-family:'Vollkorn', serif; |
|||
font-size: 16px; |
|||
line-height: 25px; |
|||
text-transform: uppercase; |
|||
font-weight: bold; |
|||
color: #75526b; |
|||
border: 3px dashed #75526b; |
|||
float: left; |
|||
padding: 4px 12px; |
|||
-webkit-transform: rotate(-7deg); |
|||
-o-transform: rotate(-7deg); |
|||
-moz-transform: rotate(-7deg); |
|||
-ms-transform: rotate(-7deg);"> |
|||
Tested on Odoo<br/>10.0 enterprise |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,85 @@ |
|||
odoo.define("mail_archives.archives", function(require) { |
|||
"use strict"; |
|||
|
|||
var base_obj = require("mail_base.base"); |
|||
|
|||
// -------------------------------------------------------------------------------
|
|||
var core = require("web.core"); |
|||
var session = require("web.session"); |
|||
|
|||
var _lt = core._lt; |
|||
// -------------------------------------------------------------------------------
|
|||
|
|||
var ChatAction = core.action_registry.get("mail.chat.instant_messaging"); |
|||
ChatAction.include({ |
|||
init: function(parent, action, options) { |
|||
this._super.apply(this, arguments); |
|||
var channel_name = "channel_archive"; |
|||
// Add channel Archive for enable "display_subject" option
|
|||
this.channels_display_subject.push(channel_name); |
|||
}, |
|||
|
|||
update_message_on_current_channel: function(current_channel_id, message) { |
|||
var result = this._super.apply(this, arguments); |
|||
var archive = |
|||
current_channel_id === "channel_archive" && !message.is_archive; |
|||
return archive || result; |
|||
}, |
|||
}); |
|||
|
|||
// Inherit class and override methods
|
|||
base_obj.MailTools.include({ |
|||
get_properties: function(msg) { |
|||
var properties = this._super.apply(this, arguments); |
|||
properties.is_archive = this.property_descr("channel_archive", msg, this); |
|||
return properties; |
|||
}, |
|||
|
|||
set_channel_flags: function(data, msg) { |
|||
this._super.apply(this, arguments); |
|||
// Get recipients ids
|
|||
var recipients_ids = []; |
|||
for (var i = 0; i < (data.partner_ids || []).length; i++) { |
|||
recipients_ids.push(data.partner_ids[i][0]); |
|||
} |
|||
|
|||
// If author or recipient
|
|||
if ( |
|||
data.author_id[0] === session.partner_id || |
|||
recipients_ids.indexOf(session.partner_id) !== -1 |
|||
) { |
|||
msg.is_archive = true; |
|||
} |
|||
|
|||
return msg; |
|||
}, |
|||
|
|||
get_channel_array: function(msg) { |
|||
var arr = this._super.apply(this, arguments); |
|||
return arr.concat("channel_archive"); |
|||
}, |
|||
|
|||
get_domain: function(channel) { |
|||
return channel.id === "channel_archive" |
|||
? [ |
|||
"|", |
|||
["partner_ids", "in", [openerp.session.partner_id]], |
|||
["author_id.user_ids", "in", [openerp.session.uid]], |
|||
] |
|||
: this._super.apply(this, arguments); |
|||
}, |
|||
}); |
|||
|
|||
base_obj.chat_manager.is_ready.then(function() { |
|||
// Add archive channel
|
|||
base_obj.chat_manager.mail_tools.add_channel({ |
|||
id: "channel_archive", |
|||
name: _lt("Archive"), |
|||
type: "static", |
|||
}); |
|||
|
|||
return $.when(); |
|||
}); |
|||
|
|||
return base_obj.chat_manager; |
|||
}); |
@ -0,0 +1,24 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<template> |
|||
<!--Inherit Sidebar and add Archive menu item after Starred --> |
|||
<t t-extend="mail.chat.Sidebar"> |
|||
<t t-jquery="div[data-channel-id=channel_starred]" t-operation="after"> |
|||
<div |
|||
t-attf-class="o_mail_chat_channel_item #{(active_channel_id == 'channel_archive') ? 'o_active': ''}" |
|||
data-channel-id="channel_archive" |
|||
> |
|||
<span class="o_channel_name mail_archives"> <i |
|||
class="fa fa-archive" |
|||
/> Archive </span> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
<!--Add message about empty archive page--> |
|||
<t t-extend="mail.EmptyChannel"> |
|||
<t t-jquery="t:last-child" t-operation="after"> |
|||
<t t-if="options.channel_id==='channel_archive'"> |
|||
<div class="o_thread_title">Archive is empty</div> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import test_js |
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
import odoo.tests |
|||
|
|||
|
|||
@odoo.tests.common.at_install(False) |
|||
@odoo.tests.common.post_install(True) |
|||
class TestUi(odoo.tests.HttpCase): |
|||
def test_01_mail_archives(self): |
|||
# wait till page loaded and then click and wait again |
|||
code = """ |
|||
setTimeout(function () { |
|||
$(".mail_archives").click(); |
|||
setTimeout(function () {console.log('ok');}, 3000); |
|||
}, 1000); |
|||
""" |
|||
link = "/web#action=%s" % self.ref("mail.mail_channel_action_client_chat") |
|||
self.phantom_js( |
|||
link, |
|||
code, |
|||
"odoo.__DEBUG__.services['mail_archives.archives']", |
|||
login="admin", |
|||
) |
@ -0,0 +1,17 @@ |
|||
<?xml version="1.0" ?> |
|||
<openerp> |
|||
<data> |
|||
<template |
|||
id="res_partner_mails_count_assets_backend" |
|||
name="res_partner_mails_count_assets_backend" |
|||
inherit_id="web.assets_backend" |
|||
> |
|||
<xpath expr="." position="inside"> |
|||
<script |
|||
src="/mail_archives/static/src/js/archives.js" |
|||
type="text/javascript" |
|||
/> |
|||
</xpath> |
|||
</template> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,29 @@ |
|||
.. image:: https://itpp.dev/images/infinity-readme.png |
|||
:alt: Tested and maintained by IT Projects Labs |
|||
:target: https://itpp.dev |
|||
|
|||
=================== |
|||
Popup Attachments |
|||
=================== |
|||
|
|||
The module opens attached mail images in popup. |
|||
|
|||
Questions? |
|||
========== |
|||
|
|||
To get an assistance on this module contact us by email :arrow_right: help@itpp.dev |
|||
|
|||
Contributors |
|||
============ |
|||
* Dinar Gabbasov <gabbasov@it-projects.info> |
|||
|
|||
|
|||
The module is not maintained in future versions because it's functionality built-in since Odoo 11.0. |
|||
|
|||
Further information |
|||
=================== |
|||
|
|||
Odoo Apps Store: https://apps.odoo.com/apps/modules/10.0/mail_attachment_popup/ |
|||
|
|||
|
|||
Tested on `Odoo 10.0 <https://github.com/odoo/odoo/commit/9cf666288076dc4e315e62e7ca0d6fc59995a498>`_ |
@ -0,0 +1,18 @@ |
|||
# -*- coding: utf-8 -*- |
|||
{ |
|||
"name": """Popup Attachments""", |
|||
"summary": """Open attached mail images in popup""", |
|||
"category": "Extra Tools", |
|||
"version": "10.0.1.0.0", |
|||
"images": ["images/popup_image.png"], |
|||
"author": "IT-Projects LLC, Dinar Gabbasov", |
|||
"support": "apps@itpp.dev", |
|||
"website": "https://twitter.com/gabbasov_dinar", |
|||
"license": "GPL-3", |
|||
"depends": ["mail"], |
|||
"external_dependencies": {"python": [], "bin": []}, |
|||
"data": ["views/mail_attachment_popup_template.xml"], |
|||
"qweb": ["static/src/xml/mail_attachment_popup.xml"], |
|||
"installable": True, |
|||
"auto_install": False, |
|||
} |
@ -0,0 +1,4 @@ |
|||
`1.0.0` |
|||
------- |
|||
|
|||
- Init version |
@ -0,0 +1,16 @@ |
|||
=================== |
|||
Popup Attachments |
|||
=================== |
|||
|
|||
Installation |
|||
============ |
|||
|
|||
* `Install <https://odoo-development.readthedocs.io/en/latest/odoo/usage/install-module.html>`__ this module in a usual way |
|||
|
|||
Usage |
|||
===== |
|||
|
|||
* Open 'Messaging' menu |
|||
* Find any message with image in attachments |
|||
* Click on the image |
|||
* Browser opens image in popup instead of downloading it |
@ -0,0 +1,28 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_attachment_popup |
|||
# |
|||
# Translators: |
|||
# Dawid Runowski <dawrun@outlook.com>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+0000\n" |
|||
"Last-Translator: Dawid Runowski <dawrun@outlook.com>, 2019\n" |
|||
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/" |
|||
"de/)\n" |
|||
"Language: de\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_attachment_popup |
|||
#. openerp-web |
|||
#: code:addons/mail_attachment_popup/static/src/xml/mail_attachment_popup.xml:17 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "Herunterladen" |
@ -0,0 +1,27 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_attachment_popup |
|||
# |
|||
# Translators: |
|||
# Randall Castro <rcastro@treintaycinco.com>, 2018 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-12-19 16:49+0000\n" |
|||
"PO-Revision-Date: 2017-12-19 16:49+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" |
|||
"Language: es\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
|||
|
|||
#. module: mail_attachment_popup |
|||
#. openerp-web |
|||
#: code:addons/mail_attachment_popup/static/src/xml/mail_attachment_popup.xml:17 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "Descargar" |
@ -0,0 +1,22 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_attachment_popup |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \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_attachment_popup |
|||
#. openerp-web |
|||
#: code:addons/mail_attachment_popup/static/src/xml/mail_attachment_popup.xml:37 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "" |
|||
|
@ -0,0 +1,29 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_attachment_popup |
|||
# |
|||
# Translators: |
|||
# Dinar <gabbasov@it-projects.info>, 2017 |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-11-16 08:35+0000\n" |
|||
"PO-Revision-Date: 2017-11-16 08:35+0000\n" |
|||
"Last-Translator: Dinar <gabbasov@it-projects.info>, 2017\n" |
|||
"Language-Team: Russian (https://www.transifex.com/it-projects-llc/" |
|||
"teams/76080/ru/)\n" |
|||
"Language: ru\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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_attachment_popup |
|||
#. openerp-web |
|||
#: code:addons/mail_attachment_popup/static/src/xml/mail_attachment_popup.xml:17 |
|||
#, python-format |
|||
msgid "Download" |
|||
msgstr "Скачать" |
After Width: 749 | Height: 371 | Size: 128 KiB |
After Width: 361 | Height: 382 | Size: 63 KiB |
After Width: 361 | Height: 381 | Size: 131 KiB |
After Width: 100 | Height: 100 | Size: 2.1 KiB |
@ -0,0 +1,84 @@ |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2 class="oe_slogan">Popup Attachments</h2> |
|||
<h3 class="oe_slogan">Open attachments in popup</h3> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<p class="oe_mt32"> |
|||
The module allows to open attachments (images) in popup. It is convenient if you want to display them only without downloading. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h3 class="oe_slogan">How it works</h3> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span6"> |
|||
<p class="oe_mt32"> |
|||
Go to "Messaging" menu and open email that contains image(s) in attachment. |
|||
</p> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_demo oe_picture oe_screenshot" src="attach_image.png"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span6"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_demo oe_picture oe_screenshot" src="popup.png"/> |
|||
</div> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<p class="oe_mt32"> |
|||
Click on the image and see how popup is appear. |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span6"> |
|||
<p class="oe_mt32"> |
|||
Moreover, you can download it to your device by clicking on the "Download" button if needed. |
|||
</p> |
|||
</div> |
|||
<div class="oe_span6"> |
|||
<div class="oe_row_img oe_centered"> |
|||
<img class="oe_demo oe_picture oe_screenshot" src="download.png"/> |
|||
</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:apps@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:apps@it-projects.info">apps@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> |
After Width: 365 | Height: 382 | Size: 150 KiB |
@ -0,0 +1,429 @@ |
|||
/* |
|||
|
|||
arcticModal — jQuery plugin |
|||
Version: 0.3 |
|||
Author: Sergey Predvoditelev (sergey.predvoditelev@gmail.com) |
|||
Company: Arctic Laboratory (http://arcticlab.ru/)
|
|||
|
|||
Docs & Examples: http://arcticlab.ru/arcticmodal/
|
|||
|
|||
*/ |
|||
(function($) { |
|||
|
|||
|
|||
var default_options = { |
|||
|
|||
type: 'html', // ajax или html
|
|||
content: '', |
|||
url: '', |
|||
ajax: {}, |
|||
ajax_request: null, |
|||
|
|||
closeOnEsc: true, |
|||
closeOnOverlayClick: true, |
|||
|
|||
clone: false, |
|||
|
|||
overlay: { |
|||
block: undefined, |
|||
tpl: '<div class="arcticmodal-overlay"></div>', |
|||
css: { |
|||
backgroundColor: '#000', |
|||
opacity: .6 |
|||
} |
|||
}, |
|||
|
|||
container: { |
|||
block: undefined, |
|||
tpl: '<div class="arcticmodal-container"><table class="arcticmodal-container_i"><tr><td class="arcticmodal-container_i2"></td></tr></table></div>' |
|||
}, |
|||
|
|||
wrap: undefined, |
|||
body: undefined, |
|||
|
|||
errors: { |
|||
tpl: '<div class="arcticmodal-error arcticmodal-close"></div>', |
|||
autoclose_delay: 2000, |
|||
ajax_unsuccessful_load: 'Error' |
|||
}, |
|||
|
|||
openEffect: { |
|||
type: 'fade', |
|||
speed: 400 |
|||
}, |
|||
closeEffect: { |
|||
type: 'fade', |
|||
speed: 400 |
|||
}, |
|||
|
|||
beforeOpen: $.noop, |
|||
afterOpen: $.noop, |
|||
beforeClose: $.noop, |
|||
afterClose: $.noop, |
|||
afterLoading: $.noop, |
|||
afterLoadingOnShow: $.noop, |
|||
errorLoading: $.noop |
|||
|
|||
}; |
|||
|
|||
|
|||
var modalID = 0; |
|||
var modals = $([]); |
|||
|
|||
|
|||
var utils = { |
|||
|
|||
|
|||
// Определяет произошло ли событие e вне блока block
|
|||
isEventOut: function(blocks, e) { |
|||
var r = true; |
|||
$(blocks).each(function() { |
|||
if ($(e.target).get(0)==$(this).get(0)) r = false; |
|||
if ($(e.target).closest('HTML', $(this).get(0)).length==0) r = false; |
|||
}); |
|||
return r; |
|||
} |
|||
|
|||
|
|||
}; |
|||
|
|||
|
|||
var modal = { |
|||
|
|||
|
|||
// Возвращает элемент, которым был вызван плагин
|
|||
getParentEl: function(el) { |
|||
var r = $(el); |
|||
if (r.data('arcticmodal')) return r; |
|||
r = $(el).closest('.arcticmodal-container').data('arcticmodalParentEl'); |
|||
if (r) return r; |
|||
return false; |
|||
}, |
|||
|
|||
|
|||
// Переход
|
|||
transition: function(el, action, options, callback) { |
|||
callback = callback==undefined ? $.noop : callback; |
|||
switch (options.type) { |
|||
case 'fade': |
|||
action=='show' ? el.fadeIn(options.speed, callback) : el.fadeOut(options.speed, callback); |
|||
break; |
|||
case 'none': |
|||
action=='show' ? el.show() : el.hide(); |
|||
callback(); |
|||
break; |
|||
} |
|||
}, |
|||
|
|||
|
|||
// Подготвка содержимого окна
|
|||
prepare_body: function(D, $this) { |
|||
|
|||
// Обработчик закрытия
|
|||
$('.arcticmodal-close', D.body).unbind('click.arcticmodal').bind('click.arcticmodal', function() { |
|||
$this.arcticmodal('close'); |
|||
return false; |
|||
}); |
|||
|
|||
}, |
|||
|
|||
|
|||
// Инициализация элемента
|
|||
init_el: function($this, options) { |
|||
var D = $this.data('arcticmodal'); |
|||
if (D) return; |
|||
|
|||
D = options; |
|||
modalID++; |
|||
D.modalID = modalID; |
|||
|
|||
// Overlay
|
|||
D.overlay.block = $(D.overlay.tpl); |
|||
D.overlay.block.css(D.overlay.css); |
|||
|
|||
// Container
|
|||
D.container.block = $(D.container.tpl); |
|||
|
|||
// BODY
|
|||
D.body = $('.arcticmodal-container_i2', D.container.block); |
|||
if (options.clone) { |
|||
D.body.html($this.clone(true)); |
|||
} else { |
|||
$this.before('<div id="arcticmodalReserve' + D.modalID + '" style="display: none" />'); |
|||
D.body.html($this); |
|||
} |
|||
|
|||
// Подготовка содержимого
|
|||
modal.prepare_body(D, $this); |
|||
|
|||
// Закрытие при клике на overlay
|
|||
if (D.closeOnOverlayClick) |
|||
D.overlay.block.add(D.container.block).click(function(e) { |
|||
if (utils.isEventOut($('>*', D.body), e)) |
|||
$this.arcticmodal('close'); |
|||
}); |
|||
|
|||
// Запомним настройки
|
|||
D.container.block.data('arcticmodalParentEl', $this); |
|||
$this.data('arcticmodal', D); |
|||
modals = $.merge(modals, $this); |
|||
|
|||
// Показать
|
|||
$.proxy(actions.show, $this)(); |
|||
if (D.type=='html') return $this; |
|||
|
|||
// Ajax-загрузка
|
|||
if (D.ajax.beforeSend!=undefined) { |
|||
var fn_beforeSend = D.ajax.beforeSend; |
|||
delete D.ajax.beforeSend; |
|||
} |
|||
if (D.ajax.success!=undefined) { |
|||
var fn_success = D.ajax.success; |
|||
delete D.ajax.success; |
|||
} |
|||
if (D.ajax.error!=undefined) { |
|||
var fn_error = D.ajax.error; |
|||
delete D.ajax.error; |
|||
} |
|||
var o = $.extend(true, { |
|||
url: D.url, |
|||
beforeSend: function() { |
|||
if (fn_beforeSend==undefined) { |
|||
D.body.html('<div class="arcticmodal-loading" />'); |
|||
} else { |
|||
fn_beforeSend(D, $this); |
|||
} |
|||
}, |
|||
success: function(responce) { |
|||
|
|||
// Событие после загрузки до показа содержимого
|
|||
$this.trigger('afterLoading'); |
|||
D.afterLoading(D, $this, responce); |
|||
|
|||
if (fn_success==undefined) { |
|||
D.body.html(responce); |
|||
} else { |
|||
fn_success(D, $this, responce); |
|||
} |
|||
modal.prepare_body(D, $this); |
|||
|
|||
// Событие после загрузки после отображения содержимого
|
|||
$this.trigger('afterLoadingOnShow'); |
|||
D.afterLoadingOnShow(D, $this, responce); |
|||
|
|||
}, |
|||
error: function() { |
|||
|
|||
// Событие при ошибке загрузки
|
|||
$this.trigger('errorLoading'); |
|||
D.errorLoading(D, $this); |
|||
|
|||
if (fn_error==undefined) { |
|||
D.body.html(D.errors.tpl); |
|||
$('.arcticmodal-error', D.body).html(D.errors.ajax_unsuccessful_load); |
|||
$('.arcticmodal-close', D.body).click(function() { |
|||
$this.arcticmodal('close'); |
|||
return false; |
|||
}); |
|||
if (D.errors.autoclose_delay) |
|||
setTimeout(function() { |
|||
$this.arcticmodal('close'); |
|||
}, D.errors.autoclose_delay); |
|||
} else { |
|||
fn_error(D, $this); |
|||
} |
|||
} |
|||
}, D.ajax); |
|||
D.ajax_request = $.ajax(o); |
|||
|
|||
// Запомнить настройки
|
|||
$this.data('arcticmodal', D); |
|||
|
|||
}, |
|||
|
|||
|
|||
// Инициализация
|
|||
init: function(options) { |
|||
options = $.extend(true, {}, default_options, options); |
|||
if ($.isFunction(this)) { |
|||
if (options==undefined) { |
|||
$.error('jquery.arcticmodal: Uncorrect parameters'); |
|||
return; |
|||
} |
|||
if (options.type=='') { |
|||
$.error('jquery.arcticmodal: Don\'t set parameter "type"'); |
|||
return; |
|||
} |
|||
switch (options.type) { |
|||
case 'html': |
|||
if (options.content=='') { |
|||
$.error('jquery.arcticmodal: Don\'t set parameter "content"'); |
|||
return |
|||
} |
|||
var c = options.content; |
|||
options.content = ''; |
|||
|
|||
return modal.init_el($(c), options); |
|||
break; |
|||
case 'ajax': |
|||
if (options.url=='') { |
|||
$.error('jquery.arcticmodal: Don\'t set parameter "url"'); |
|||
return; |
|||
} |
|||
return modal.init_el($('<div />'), options); |
|||
break; |
|||
} |
|||
} else { |
|||
return this.each(function() { |
|||
modal.init_el($(this), $.extend(true, {}, options)); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
|
|||
}; |
|||
|
|||
|
|||
var actions = { |
|||
|
|||
|
|||
// Показать
|
|||
show: function() { |
|||
var $this = modal.getParentEl(this); |
|||
if ($this===false) { |
|||
$.error('jquery.arcticmodal: Uncorrect call'); |
|||
return; |
|||
} |
|||
var D = $this.data('arcticmodal'); |
|||
|
|||
// Добавить overlay и container
|
|||
D.overlay.block.hide(); |
|||
D.container.block.hide(); |
|||
$('BODY').append(D.overlay.block); |
|||
$('BODY').append(D.container.block); |
|||
|
|||
// Событие
|
|||
D.beforeOpen(D, $this); |
|||
$this.trigger('beforeOpen'); |
|||
|
|||
// Wrap
|
|||
if (D.wrap.css('overflow')!='hidden') { |
|||
D.wrap.data('arcticmodalOverflow', D.wrap.css('overflow')); |
|||
var w1 = D.wrap.outerWidth(true); |
|||
D.wrap.css('overflow', 'hidden'); |
|||
var w2 = D.wrap.outerWidth(true); |
|||
if (w2!=w1) |
|||
D.wrap.css('marginRight', (w2 - w1) + 'px'); |
|||
} |
|||
|
|||
// Скрыть предыдущие оверлеи
|
|||
modals.not($this).each(function() { |
|||
var d = $(this).data('arcticmodal'); |
|||
d.overlay.block.hide(); |
|||
}); |
|||
|
|||
// Показать
|
|||
modal.transition(D.overlay.block, 'show', modals.length>1 ? {type: 'none'} : D.openEffect); |
|||
modal.transition(D.container.block, 'show', modals.length>1 ? {type: 'none'} : D.openEffect, function() { |
|||
D.afterOpen(D, $this); |
|||
$this.trigger('afterOpen'); |
|||
}); |
|||
|
|||
return $this; |
|||
}, |
|||
|
|||
|
|||
// Закрыть
|
|||
close: function() { |
|||
if ($.isFunction(this)) { |
|||
modals.each(function() { |
|||
$(this).arcticmodal('close'); |
|||
}); |
|||
} else { |
|||
return this.each(function() { |
|||
var $this = modal.getParentEl(this); |
|||
if ($this===false) { |
|||
$.error('jquery.arcticmodal: Uncorrect call'); |
|||
return; |
|||
} |
|||
var D = $this.data('arcticmodal'); |
|||
|
|||
// Событие перед закрытием
|
|||
if (D.beforeClose(D, $this)===false) return; |
|||
$this.trigger('beforeClose'); |
|||
|
|||
// Показать предыдущие оверлеи
|
|||
modals.not($this).last().each(function() { |
|||
var d = $(this).data('arcticmodal'); |
|||
d.overlay.block.show(); |
|||
}); |
|||
|
|||
modal.transition(D.overlay.block, 'hide', modals.length>1 ? {type: 'none'} : D.closeEffect); |
|||
modal.transition(D.container.block, 'hide', modals.length>1 ? {type: 'none'} : D.closeEffect, function() { |
|||
|
|||
// Событие после закрытия
|
|||
D.afterClose(D, $this); |
|||
$this.trigger('afterClose'); |
|||
|
|||
// Если не клонировали - вернём на место
|
|||
if (!D.clone) |
|||
$('#arcticmodalReserve' + D.modalID).replaceWith(D.body.find('>*')); |
|||
|
|||
D.overlay.block.remove(); |
|||
D.container.block.remove(); |
|||
$this.data('arcticmodal', null); |
|||
if (!$('.arcticmodal-container').length) { |
|||
if (D.wrap.data('arcticmodalOverflow')) |
|||
D.wrap.css('overflow', D.wrap.data('arcticmodalOverflow')); |
|||
D.wrap.css('marginRight', 0); |
|||
} |
|||
|
|||
}); |
|||
|
|||
if (D.type=='ajax') |
|||
D.ajax_request.abort(); |
|||
|
|||
modals = modals.not($this); |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
|
|||
// Установить опции по-умолчанию
|
|||
setDefault: function(options) { |
|||
$.extend(true, default_options, options); |
|||
} |
|||
|
|||
|
|||
}; |
|||
|
|||
|
|||
$(function() { |
|||
default_options.wrap = $((document.all && !document.querySelector) ? 'html' : 'body'); |
|||
}); |
|||
|
|||
|
|||
// Закрытие при нажатии Escape
|
|||
$(document).bind('keyup.arcticmodal', function(e) { |
|||
var m = modals.last(); |
|||
if (!m.length) return; |
|||
var D = m.data('arcticmodal'); |
|||
if (D.closeOnEsc && (e.keyCode===27)) |
|||
m.arcticmodal('close'); |
|||
}); |
|||
|
|||
|
|||
$.arcticmodal = $.fn.arcticmodal = function(method) { |
|||
|
|||
if (actions[method]) { |
|||
return actions[method].apply(this, Array.prototype.slice.call(arguments, 1)); |
|||
} else if (typeof method==='object' || !method) { |
|||
return modal.init.apply(this, arguments); |
|||
} else { |
|||
$.error('jquery.arcticmodal: Method ' + method + ' does not exist'); |
|||
} |
|||
|
|||
}; |
|||
|
|||
|
|||
})(jQuery); |
@ -0,0 +1,43 @@ |
|||
.arcticmodal-overlay, |
|||
.arcticmodal-container { |
|||
position: fixed; |
|||
left: 0; |
|||
top: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
z-index: 1010; |
|||
} |
|||
.arcticmodal-container { |
|||
overflow: auto; |
|||
margin: 0; |
|||
padding: 0; |
|||
border: 0; |
|||
border-collapse: collapse; |
|||
} |
|||
*:first-child + html .arcticmodal-container { |
|||
height: 100%; |
|||
} |
|||
.arcticmodal-container_i { |
|||
height: 100%; |
|||
margin: 0 auto; |
|||
} |
|||
.arcticmodal-container_i2 { |
|||
padding: 24px; |
|||
margin: 0; |
|||
border: 0; |
|||
vertical-align: middle; |
|||
padding-top: 50px; |
|||
} |
|||
.arcticmodal-error { |
|||
padding: 20px; |
|||
border-radius: 10px; |
|||
background: #000; |
|||
color: #fff; |
|||
} |
|||
.arcticmodal-loading { |
|||
width: 80px; |
|||
height: 80px; |
|||
border-radius: 10px; |
|||
background: #000 url(/mail_attachment_popup/static/src/img/loading.gif) no-repeat |
|||
50% 50%; |
|||
} |
@ -0,0 +1,21 @@ |
|||
.box-modal { |
|||
position: relative; |
|||
padding: 16px; |
|||
background: #fff; |
|||
color: #3c3c3c; |
|||
font: 14px/18px Arial, "Helvetica CY", "Nimbus Sans L", sans-serif; |
|||
box-shadow: 0 0 0 6px rgba(153, 153, 153, 0.3); |
|||
border-radius: 6px; |
|||
} |
|||
.box-modal_close { |
|||
position: absolute; |
|||
right: -25px; |
|||
top: -25px; |
|||
font-size: 30px; |
|||
line-height: 15px; |
|||
color: #ffffff; |
|||
cursor: pointer; |
|||
} |
|||
.box-modal_close:hover { |
|||
color: #b1b1b1; |
|||
} |
@ -0,0 +1,16 @@ |
|||
.g-hidden { |
|||
display: none; |
|||
} |
|||
.box-modal img { |
|||
max-width: 900px; |
|||
width: 100%; |
|||
} |
|||
.box-modal-li li { |
|||
list-style-type: none; |
|||
} |
|||
.box-modal-li { |
|||
padding-left: 0; |
|||
} |
|||
.o_attachment .o_image { |
|||
cursor: pointer; |
|||
} |
After Width: 32 | Height: 32 | Size: 3.1 KiB |
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<template> |
|||
<t t-extend="mail.Attachment"> |
|||
<t t-jquery="div[t-att-title='attachment.name'] .o_image" t-operation="replace"> |
|||
<t |
|||
t-if="attachment.mimetype and attachment.mimetype.search('image/') !== -1" |
|||
> |
|||
<span |
|||
class="m-dotted" |
|||
t-attf-onclick="$('#ImageModal{{ attachment.id }}').arcticmodal()" |
|||
> |
|||
<div |
|||
class="o_image" |
|||
target="_blank" |
|||
t-att-data-mimetype="attachment.mimetype" |
|||
t-attf-data-src="/web/image/#{attachment.id}/100x80" |
|||
> |
|||
<span class='o_attachment_name'> |
|||
<t t-esc='attachment.name' /> |
|||
</span> |
|||
</div> |
|||
</span> |
|||
<div class="g-hidden"> |
|||
<div class="box-modal" t-attf-id="ImageModal{{ attachment.id }}"> |
|||
<div class="box-modal_close arcticmodal-close">X</div> |
|||
<img |
|||
t-att-data-mimetype="attachment.mimetype" |
|||
t-attf-src="/web/image/#{attachment.id}" |
|||
/> |
|||
<ul class="box-modal-li"> |
|||
<li> |
|||
<span class='o_attachment_name'> |
|||
<t t-esc='attachment.name' /> |
|||
</span> |
|||
</li> |
|||
<li> |
|||
<span class='oe_download_original_img'> |
|||
<a |
|||
t-att-href='attachment.url' |
|||
target="_blank" |
|||
>Download</a> |
|||
</span> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
<t |
|||
t-if="! (attachment.mimetype and attachment.mimetype.search('image/') !== -1)" |
|||
> |
|||
<a |
|||
class="o_image" |
|||
t-att-href='attachment.url' |
|||
target="_blank" |
|||
t-att-data-mimetype="attachment.mimetype" |
|||
t-attf-data-src="/web/image/#{attachment.id}/100x80" |
|||
> |
|||
<span class='o_attachment_name'> |
|||
<t t-esc='attachment.name' /> |
|||
</span> |
|||
</a> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
</template> |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="utf-8" ?> |
|||
<openerp> |
|||
<data> |
|||
<template |
|||
id="assets_backend" |
|||
name="mail attachment popup assets" |
|||
inherit_id="web.assets_backend" |
|||
> |
|||
<xpath expr="." position="inside"> |
|||
<link |
|||
rel="stylesheet" |
|||
href="/mail_attachment_popup/static/src/css/jquery.arcticmodal.css" |
|||
/> |
|||
<link |
|||
rel="stylesheet" |
|||
href="/mail_attachment_popup/static/src/css/simple.css" |
|||
/> |
|||
<link |
|||
rel="stylesheet" |
|||
href="/mail_attachment_popup/static/src/css/styles.css" |
|||
/> |
|||
<script |
|||
type="text/javascript" |
|||
src="/mail_attachment_popup/static/lib/js/jquery.arcticmodal.js" |
|||
/> |
|||
</xpath> |
|||
</template> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,26 @@ |
|||
.. 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/10.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. |
|||
|
|||
Further information |
|||
=================== |
|||
|
|||
.. Odoo Apps Store: https://apps.odoo.com/apps/modules/10.0/mail_base/ |
|||
|
|||
|
|||
Tested on `Odoo 10.0 <https://github.com/odoo/odoo/commit/1be57f2825af4f3ade20a658c6f97f6cf93cc866>`_ |
@ -0,0 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# License MIT (https://opensource.org/licenses/MIT) |
|||
|
|||
from . import models |
|||
from . import controllers |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 x620 <https://github.com/x620> |
|||
# Copyright 2018 Ruslan Ronzhin <https://it-projects.info/team/rusllan/> |
|||
# Copyright 2016-2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
|||
# License MIT (https://opensource.org/licenses/MIT) |
|||
{ |
|||
"name": "Mail Base", |
|||
"summary": """Makes Mail extendable""", |
|||
"category": "Discuss", |
|||
"images": ['images/mail_base_image.png'], |
|||
"version": "10.0.1.1.0", |
|||
"author": "IT-Projects LLC, Pavel Romanchenko", |
|||
"support": "apps@itpp.dev", |
|||
"website": "https://twitter.com/OdooFree", |
|||
"license": "Other OSI approved licence", # MIT |
|||
"depends": ["base", "mail"], |
|||
"data": ["views/templates.xml"], |
|||
"installable": True, |
|||
} |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import main |
@ -0,0 +1,19 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2017 mikaelh <https://github.com/mikaelh> |
|||
# Copyright 2017-2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
|||
# License MIT (https://opensource.org/licenses/MIT) |
|||
from openerp.addons.bus.controllers.main import BusController |
|||
from openerp.http import request |
|||
|
|||
|
|||
class MailChatController(BusController): |
|||
# ----------------------------- |
|||
# Extends BUS Controller Poll |
|||
# ----------------------------- |
|||
|
|||
def _poll(self, dbname, channels, last, options): |
|||
if request.session.uid: |
|||
channels = list(channels) # do not alter original list |
|||
channels.append((request.db, "mail_base.mail_sent")) |
|||
|
|||
return super(MailChatController, self)._poll(dbname, channels, last, options) |
@ -0,0 +1,30 @@ |
|||
`1.1.0` |
|||
------- |
|||
- **New**: added ability to select channels for private message sending. |
|||
|
|||
`1.0.5` |
|||
------- |
|||
**FIX**: polling errors on heavy server load |
|||
|
|||
`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 |
@ -0,0 +1,4 @@ |
|||
Mail Base |
|||
========= |
|||
|
|||
To use this module you need either install module that depends on it or create new module. |
@ -0,0 +1,31 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_base |
|||
# |
|||
# Translators: |
|||
# Dawid Runowski <dawrun@outlook.com>, 2019 |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+0000\n" |
|||
"Last-Translator: Dawid Runowski <dawrun@outlook.com>, 2019\n" |
|||
"Language-Team: German (https://www.transifex.com/it-projects-llc/teams/76080/" |
|||
"de/)\n" |
|||
"Language: de\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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 "" |
|||
|
|||
#. module: mail_base |
|||
#: model:ir.model,name:mail_base.model_mail_message |
|||
msgid "Message" |
|||
msgstr "Nachricht" |
@ -0,0 +1,30 @@ |
|||
# 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 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2017-12-19 16:49+0000\n" |
|||
"PO-Revision-Date: 2017-12-19 16:49+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" |
|||
"Language: es\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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 crear email" |
|||
|
|||
#. module: mail_base |
|||
#: model:ir.model,name:mail_base.model_mail_message |
|||
msgid "Message" |
|||
msgstr "Mensaje" |
@ -0,0 +1,30 @@ |
|||
# 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" |
|||
"Language: it\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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" |
@ -0,0 +1,25 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * mail_base |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 10.0\n" |
|||
"Report-Msgid-Bugs-To: \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_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 "" |
|||
|
@ -0,0 +1,30 @@ |
|||
# 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-12-15 13:31+0000\n" |
|||
"PO-Revision-Date: 2017-12-15 13:31+0000\n" |
|||
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2017\n" |
|||
"Language-Team: Portuguese (https://www.transifex.com/it-projects-llc/" |
|||
"teams/76080/pt/)\n" |
|||
"Language: pt\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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" |
@ -0,0 +1,30 @@ |
|||
# 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-12-15 13:31+0000\n" |
|||
"PO-Revision-Date: 2017-12-15 13:31+0000\n" |
|||
"Last-Translator: Translation Bot <i18n-bot@it-projects.info>, 2017\n" |
|||
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/it-projects-" |
|||
"llc/teams/76080/pt_BR/)\n" |
|||
"Language: pt_BR\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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" |
@ -0,0 +1,32 @@ |
|||
# 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" |
|||
"Language: ru\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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 "Сообщение" |
@ -0,0 +1,33 @@ |
|||
# 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 10.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2018-05-05 23:11+0000\n" |
|||
"PO-Revision-Date: 2017-06-23 14:31+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" |
|||
"Language: sl\n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \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 e-pošte" |
|||
|
|||
#. module: mail_base |
|||
#: model:ir.model,name:mail_base.model_mail_message |
|||
msgid "Message" |
|||
msgstr "Sporočilo" |
After Width: 750 | Height: 371 | Size: 177 KiB |
@ -0,0 +1,36 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright 2016 x620 <https://github.com/x620> |
|||
# Copyright 2017 Ivan Yelizariev <https://it-projects.info/team/yelizariev> |
|||
# License MIT (https://opensource.org/licenses/MIT) |
|||
|
|||
from openerp 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 |
After Width: 100 | Height: 100 | Size: 2.1 KiB |
1468
mail_base/static/lib/base.js
File diff suppressed because it is too large
View File
@ -0,0 +1,14 @@ |
|||
<?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> |
@ -0,0 +1,12 @@ |
|||
.. image:: https://itpp.dev/images/infinity-readme.png |
|||
:alt: Tested and maintained by IT Projects Labs |
|||
:target: https://itpp.dev |
|||
|
|||
Mail relocation |
|||
=============== |
|||
|
|||
Description: https://www.odoo.com/apps/modules/9.0/mail_move_message/ |
|||
|
|||
Further information and discussion: http://yelizariev.github.io/odoo/module/2015/04/10/mail-relocation.html |
|||
|
|||
Tested on `Odoo 8.0 <https://github.com/odoo/odoo/commit/d023c079ed86468436f25da613bf486a4a17d625>`_ |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import controllers |
|||
from . import mail_move_message_models |
@ -0,0 +1,15 @@ |
|||
# -*- coding: utf-8 -*- |
|||
{ |
|||
"name": "Mail relocation", |
|||
"version": "10.0.1.0.6", |
|||
"author": "IT-Projects LLC, Ivan Yelizariev, Pavel Romanchenko", |
|||
"license": "Other OSI approved licence", # MIT |
|||
"category": "Discuss", |
|||
"images": ["images/m1.png"], |
|||
"support": "apps@itpp.dev", |
|||
"website": "https://twitter.com/yelizariev", |
|||
"depends": ["mail_all", "web_polymorphic_field"], |
|||
"data": ["mail_move_message_views.xml", "data/mail_move_message_data.xml"], |
|||
"qweb": ["static/src/xml/mail_move_message_main.xml"], |
|||
"installable": True, |
|||
} |
@ -0,0 +1,2 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from . import main |
@ -0,0 +1,70 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import http |
|||
from odoo.http import request |
|||
from odoo.tools.translate import _ |
|||
|
|||
from odoo.addons.bus.controllers.main import BusController |
|||
from odoo.addons.web.controllers.main import DataSet |
|||
|
|||
|
|||
class MailChatController(BusController): |
|||
# ----------------------------- |
|||
# Extends BUS Controller Poll |
|||
# ----------------------------- |
|||
|
|||
def _poll(self, dbname, channels, last, options): |
|||
if request.session.uid: |
|||
channels = list(channels) # do not alter original list |
|||
channels.append((request.db, "mail_move_message")) |
|||
channels.append((request.db, "mail_move_message.delete_message")) |
|||
return super(MailChatController, self)._poll(dbname, channels, last, options) |
|||
|
|||
|
|||
class DataSetCustom(DataSet): |
|||
def _extend_name(self, model, records): |
|||
Model = request.env[model] |
|||
fields = Model.fields_get() |
|||
contact_field = False |
|||
for n, f in fields.iteritems(): |
|||
if f["type"] == "many2one" and f["relation"] == "res.partner": |
|||
contact_field = n |
|||
break |
|||
partner_info = {} |
|||
if contact_field: |
|||
partner_info = Model.browse([r[0] for r in records]).read([contact_field]) |
|||
partner_info = {p["id"]: p[contact_field] for p in partner_info} |
|||
res = [] |
|||
for r in records: |
|||
if partner_info.get(r[0]): |
|||
res.append( |
|||
(r[0], _("%s [%s] ID %s") % (r[1], partner_info.get(r[0])[1], r[0])) |
|||
) |
|||
else: |
|||
res.append((r[0], _("%s ID %s") % (r[1], r[0]))) |
|||
return res |
|||
|
|||
@http.route("/web/dataset/call_kw/<model>/name_search", type="json", auth="user") |
|||
def name_search(self, model, method, args, kwargs): |
|||
context = kwargs.get("context") |
|||
if context and context.get("extended_name_with_contact"): |
|||
# add order by ID desc |
|||
Model = request.env[model] |
|||
search_args = list(kwargs.get("args") or []) |
|||
limit = int(kwargs.get("limit") or 100) |
|||
operator = kwargs.get("operator") |
|||
name = kwargs.get("name") |
|||
if Model._rec_name and (not name == "" and operator == "ilike"): |
|||
search_args += [(Model._rec_name, operator, name)] |
|||
records = Model.search(search_args, limit=limit, order="id desc") |
|||
res = records.name_get() |
|||
return self._extend_name(model, res) |
|||
|
|||
return self._call_kw(model, method, args, kwargs) |
|||
|
|||
@http.route("/web/dataset/call_kw/<model>/name_get", type="json", auth="user") |
|||
def name_get(self, model, method, args, kwargs): |
|||
res = self._call_kw(model, method, args, kwargs) |
|||
context = kwargs.get("context") |
|||
if context and context.get("extended_name_with_contact"): |
|||
res = self._extend_name(model, res) |
|||
return res |
@ -0,0 +1,9 @@ |
|||
<?xml version="1.0" ?> |
|||
<openerp> |
|||
<data noupdate="1"> |
|||
<record id="mail_relocation_models" model="ir.config_parameter"> |
|||
<field name="key">mail_relocation_models</field> |
|||
<field name="value">crm.lead,project.task</field> |
|||
</record> |
|||
</data> |
|||
</openerp> |
@ -0,0 +1,31 @@ |
|||
`1.0.6` |
|||
------- |
|||
**FIX**: polling errors on heavy server load |
|||
|
|||
`1.0.5` |
|||
------- |
|||
|
|||
- FIX: TypeError "Cannot read property 'constructor' of undefined" when change a model |
|||
- FIX: Issue related to 'Move to origin' option |
|||
|
|||
`1.0.4` |
|||
------- |
|||
|
|||
- FIX: don't allow to relocate message to itself as it cause infinitive loop |
|||
- ADD: 'Move Followers' option -- Add followers of current record to a new record. |
|||
|
|||
`1.0.3` |
|||
------- |
|||
|
|||
- FIX email_from parsing. There was an error with specific email_from value (e.g. '"name @ example" <name@example.com>') |
|||
|
|||
`1.0.2` |
|||
------- |
|||
|
|||
- big improvements in interface |
|||
|
|||
`1.0.1` |
|||
------- |
|||
|
|||
- fix bug "some messages are not shown in inbox after relocation" |
|||
- improve "Move back" tool |