Compare commits

...

No commits in common. '14.0' and '10.0' have entirely different histories.
14.0 ... 10.0

  1. 2
      .DINAR/build-date.txt
  2. 4
      .DINAR/config.yaml
  3. 1
      .DINAR/image/dependencies/pip.txt
  4. 27
      .DINAR/image/src/addons.yaml
  5. 2
      .github/FUNDING.yml
  6. 19
      .github/workflows/main.yml
  7. 91
      .gitignore
  8. 3
      .isort.cfg
  9. 12
      .pre-commit-config.yaml
  10. 5
      .pylintrc
  11. 4
      .pylintrc-mandatory
  12. 50
      .travis.yml
  13. 23
      LICENSE
  14. 27
      README.md
  15. 17
      mail_all/README.rst
  16. 3
      mail_all/__init__.py
  17. 19
      mail_all/__manifest__.py
  18. 7
      mail_all/doc/changelog.rst
  19. 9
      mail_all/doc/index.rst
  20. 36
      mail_all/i18n/de.po
  21. 35
      mail_all/i18n/es.po
  22. 30
      mail_all/i18n/mail_all.pot
  23. 37
      mail_all/i18n/sl.po
  24. BIN
      mail_all/images/1.jpg
  25. 0
      mail_all/models/__init__.py
  26. BIN
      mail_all/static/description/1.png
  27. BIN
      mail_all/static/description/2.png
  28. BIN
      mail_all/static/description/icon.png
  29. 82
      mail_all/static/description/index.html
  30. 60
      mail_all/static/src/js/mail_all.js
  31. 24
      mail_all/static/src/xml/menu.xml
  32. 3
      mail_all/tests/__init__.py
  33. 19
      mail_all/tests/test_js.py
  34. 17
      mail_all/views/templates.xml
  35. 19
      mail_archives/README.rst
  36. 0
      mail_archives/__init__.py
  37. 16
      mail_archives/__manifest__.py
  38. 36
      mail_archives/i18n/de.po
  39. 35
      mail_archives/i18n/es.po
  40. 30
      mail_archives/i18n/mail_archives.pot
  41. 37
      mail_archives/i18n/sl.po
  42. BIN
      mail_archives/images/1.jpg
  43. BIN
      mail_archives/static/description/1.png
  44. BIN
      mail_archives/static/description/2.png
  45. BIN
      mail_archives/static/description/icon.png
  46. 82
      mail_archives/static/description/index.html
  47. 85
      mail_archives/static/src/js/archives.js
  48. 24
      mail_archives/static/src/xml/menu.xml
  49. 3
      mail_archives/tests/__init__.py
  50. 22
      mail_archives/tests/test_js.py
  51. 17
      mail_archives/views/templates.xml
  52. 29
      mail_attachment_popup/README.rst
  53. 0
      mail_attachment_popup/__init__.py
  54. 18
      mail_attachment_popup/__manifest__.py
  55. 4
      mail_attachment_popup/doc/changelog.rst
  56. 16
      mail_attachment_popup/doc/index.rst
  57. 28
      mail_attachment_popup/i18n/de.po
  58. 27
      mail_attachment_popup/i18n/es.po
  59. 22
      mail_attachment_popup/i18n/mail_attachment_popup.pot
  60. 29
      mail_attachment_popup/i18n/ru.po
  61. BIN
      mail_attachment_popup/images/popup_image.png
  62. BIN
      mail_attachment_popup/static/description/attach_image.png
  63. BIN
      mail_attachment_popup/static/description/download.png
  64. BIN
      mail_attachment_popup/static/description/icon.png
  65. 84
      mail_attachment_popup/static/description/index.html
  66. BIN
      mail_attachment_popup/static/description/popup.png
  67. 429
      mail_attachment_popup/static/lib/js/jquery.arcticmodal.js
  68. 43
      mail_attachment_popup/static/src/css/jquery.arcticmodal.css
  69. 21
      mail_attachment_popup/static/src/css/simple.css
  70. 16
      mail_attachment_popup/static/src/css/styles.css
  71. BIN
      mail_attachment_popup/static/src/img/loading.gif
  72. 65
      mail_attachment_popup/static/src/xml/mail_attachment_popup.xml
  73. 29
      mail_attachment_popup/views/mail_attachment_popup_template.xml
  74. 26
      mail_base/README.rst
  75. 5
      mail_base/__init__.py
  76. 19
      mail_base/__manifest__.py
  77. 2
      mail_base/controllers/__init__.py
  78. 19
      mail_base/controllers/main.py
  79. 30
      mail_base/doc/changelog.rst
  80. 4
      mail_base/doc/index.rst
  81. 31
      mail_base/i18n/de.po
  82. 30
      mail_base/i18n/es.po
  83. 30
      mail_base/i18n/it.po
  84. 25
      mail_base/i18n/mail_base.pot
  85. 30
      mail_base/i18n/pt.po
  86. 30
      mail_base/i18n/pt_BR.po
  87. 32
      mail_base/i18n/ru.po
  88. 33
      mail_base/i18n/sl.po
  89. BIN
      mail_base/images/mail_base_image.png
  90. 36
      mail_base/models.py
  91. BIN
      mail_base/static/description/icon.png
  92. 1468
      mail_base/static/lib/base.js
  93. 14
      mail_base/views/templates.xml
  94. 12
      mail_move_message/README.rst
  95. 3
      mail_move_message/__init__.py
  96. 15
      mail_move_message/__manifest__.py
  97. 2
      mail_move_message/controllers/__init__.py
  98. 70
      mail_move_message/controllers/main.py
  99. 9
      mail_move_message/data/mail_move_message_data.xml
  100. 31
      mail_move_message/doc/changelog.rst

2
.DINAR/build-date.txt

@ -1 +1 @@
new repo readme files
April 3, 2020

4
.DINAR/config.yaml

@ -2,10 +2,6 @@ addons:
# modules to install before running tests
include:
- contacts
# "contacts" already has mail in dependencies,
# but without the following line DINAR may run odoo odoo with --init=mail,....
# which leads to error on loading mail's demo data
- mail
# modules to exclude from installation/testing
exclude:

1
.DINAR/image/dependencies/pip.txt

@ -1,2 +1 @@
# Python dependencies
pycryptodome

27
.DINAR/image/src/addons.yaml

@ -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:
- "*"

2
.github/FUNDING.yml

@ -1,2 +0,0 @@
ko_fi: itprojectsllc # This is supposed to bring some coffee for us
patreon: itpp # become our patron

19
.github/workflows/main.yml

@ -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 }}"

91
.gitignore

@ -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

3
.isort.cfg

@ -9,5 +9,4 @@ line_length=88
known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY
known_third_party=
known_third_party=openerp,requests

12
.pre-commit-config.yaml

@ -12,7 +12,6 @@ exclude: |
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
node: "14.13.0"
repos:
- repo: https://github.com/myint/autoflake
rev: v1.4
@ -78,17 +77,6 @@ repos:
rev: v1.26.2
hooks:
- id: pyupgrade
args: ["--keep-percent-format"]
- repo: https://github.com/acsone/setuptools-odoo
rev: 2.6.0
hooks:
- id: setuptools-odoo-make-default
- id: setuptools-odoo-get-requirements
args:
- --output
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://gitlab.com/PyCQA/flake8
rev: 3.8.3
hooks:

5
.pylintrc

@ -8,7 +8,7 @@ manifest_required_authors=IT Projects Labs
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3,MIT,Other OSI approved licence,OPL-1
valid_odoo_versions=14.0
valid_odoo_versions=10.0
[MESSAGES CONTROL]
disable=all
@ -21,7 +21,7 @@ disable=all
# config as a blocking check.
enable=anomalous-backslash-in-string,
api-one-deprecated,
#api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,
@ -45,6 +45,7 @@ enable=anomalous-backslash-in-string,
method-inverse,
method-required-super,
method-search,
missing-import-error,
missing-manifest-dependency,
openerp-exception-warning,
pointless-statement,

4
.pylintrc-mandatory

@ -8,13 +8,13 @@ manifest_required_authors=IT Projects Labs
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3,MIT,Other OSI approved licence,OPL-1
valid_odoo_versions=14.0
valid_odoo_versions=10.0
[MESSAGES CONTROL]
disable=all
enable=anomalous-backslash-in-string,
api-one-deprecated,
#api-one-deprecated,
api-one-multi-together,
assignment-from-none,
attribute-deprecated,

50
.travis.yml

@ -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"

23
LICENSE

@ -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.

27
README.md

@ -1,9 +1,20 @@
[![help@itpp.dev](https://itpp.dev/images/infinity-readme.png)](mailto:help@itpp.dev)
# [14.0] Odoo Mail Addons
# [10.0] Odoo Mail Addons
:open_file_folder: Get a **.zip** file with all needed dependencies:
:heavy_check_mark: [mail_all](https://apps.odoo.com/apps/modules/10.0/mail_all/)
<br/>:heavy_check_mark: [mail_archives](https://apps.odoo.com/apps/modules/10.0/mail_archives/)
<br/>:heavy_check_mark: [mail_attachment_popup](https://apps.odoo.com/apps/modules/10.0/mail_attachment_popup/)
<br/>:heavy_check_mark: [mail_base](https://apps.odoo.com/apps/modules/10.0/mail_base/)
<br/>:heavy_check_mark: [mail_move_message](https://apps.odoo.com/apps/modules/10.0/mail_move_message/)
<br/>:heavy_check_mark: [mail_private](https://apps.odoo.com/apps/modules/10.0/mail_private/)
<br/>:heavy_check_mark: [mail_recovery](https://apps.odoo.com/apps/modules/10.0/mail_recovery/)
<br/>:heavy_check_mark: [mail_reply](https://apps.odoo.com/apps/modules/10.0/mail_reply/)
<br/>:heavy_check_mark: [mail_sent](https://apps.odoo.com/apps/modules/10.0/mail_sent/)
<br/>:heavy_check_mark: [mail_to](https://apps.odoo.com/apps/modules/10.0/mail_to/)
<br/>:heavy_check_mark: [res_partner_company_messages](https://apps.odoo.com/apps/modules/10.0/res_partner_company_messages/)
<br/>:heavy_check_mark: [res_partner_mails_count](https://apps.odoo.com/apps/modules/10.0/res_partner_mails_count/)
:star: Star this repo if you **like** it!
@ -14,9 +25,9 @@ Other Addons
| Repository | Versions |
|------------|----------|
| [itpp-labs/**pos-addons**](https://github.com/itpp-labs/pos-addons) | [[14.0]](https://github.com/itpp-labs/pos-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/pos-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/pos-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/pos-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/pos-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/pos-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/pos-addons/tree/8.0#readme) [[7.0]](https://github.com/itpp-labs/pos-addons/tree/7.0#readme) |
| [itpp-labs/**mail-addons**](https://github.com/itpp-labs/mail-addons) | [[14.0]](https://github.com/itpp-labs/mail-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/mail-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/mail-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/mail-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/mail-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/mail-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/mail-addons/tree/8.0#readme) |
| [itpp-labs/**misc-addons**](https://github.com/itpp-labs/misc-addons) | [[14.0]](https://github.com/itpp-labs/misc-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/misc-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/misc-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/misc-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/misc-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/misc-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/misc-addons/tree/8.0#readme) [[7.0]](https://github.com/itpp-labs/misc-addons/tree/7.0#readme) |
| [itpp-labs/**sync-addons**](https://github.com/itpp-labs/sync-addons) | [[14.0]](https://github.com/itpp-labs/sync-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/sync-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/sync-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/sync-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/sync-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/sync-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/sync-addons/tree/8.0#readme) |
| [itpp-labs/**access-addons**](https://github.com/itpp-labs/access-addons) | [[14.0]](https://github.com/itpp-labs/access-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/access-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/access-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/access-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/access-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/access-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/access-addons/tree/8.0#readme) |
| [itpp-labs/**website-addons**](https://github.com/itpp-labs/website-addons) | [[14.0]](https://github.com/itpp-labs/website-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/website-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/website-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/website-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/website-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/website-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/website-addons/tree/8.0#readme) |
| [itpp-labs/**pos-addons**](https://github.com/itpp-labs/pos-addons) | [[15.0]](https://github.com/itpp-labs/pos-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/pos-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/pos-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/pos-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/pos-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/pos-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/pos-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/pos-addons/tree/8.0#readme) [[7.0]](https://github.com/itpp-labs/pos-addons/tree/7.0#readme) |
| [itpp-labs/**mail-addons**](https://github.com/itpp-labs/mail-addons) | [[15.0]](https://github.com/itpp-labs/mail-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/mail-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/mail-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/mail-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/mail-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/mail-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/mail-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/mail-addons/tree/8.0#readme) |
| [itpp-labs/**misc-addons**](https://github.com/itpp-labs/misc-addons) | [[15.0]](https://github.com/itpp-labs/misc-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/misc-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/misc-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/misc-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/misc-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/misc-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/misc-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/misc-addons/tree/8.0#readme) [[7.0]](https://github.com/itpp-labs/misc-addons/tree/7.0#readme) |
| [itpp-labs/**sync-addons**](https://github.com/itpp-labs/sync-addons) | [[15.0]](https://github.com/itpp-labs/sync-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/sync-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/sync-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/sync-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/sync-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/sync-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/sync-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/sync-addons/tree/8.0#readme) |
| [itpp-labs/**access-addons**](https://github.com/itpp-labs/access-addons) | [[15.0]](https://github.com/itpp-labs/access-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/access-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/access-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/access-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/access-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/access-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/access-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/access-addons/tree/8.0#readme) |
| [itpp-labs/**website-addons**](https://github.com/itpp-labs/website-addons) | [[15.0]](https://github.com/itpp-labs/website-addons/tree/15.0#readme) [[14.0]](https://github.com/itpp-labs/website-addons/tree/14.0#readme) [[13.0]](https://github.com/itpp-labs/website-addons/tree/13.0#readme) [[12.0]](https://github.com/itpp-labs/website-addons/tree/12.0#readme) [[11.0]](https://github.com/itpp-labs/website-addons/tree/11.0#readme) [[10.0]](https://github.com/itpp-labs/website-addons/tree/10.0#readme) [[9.0]](https://github.com/itpp-labs/website-addons/tree/9.0#readme) [[8.0]](https://github.com/itpp-labs/website-addons/tree/8.0#readme) |

17
mail_all/README.rst

@ -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>`_

3
mail_all/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

19
mail_all/__manifest__.py

@ -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,
}

7
mail_all/doc/changelog.rst

@ -0,0 +1,7 @@
Updates
=======
`1.0.0`
-------
- Init version

9
mail_all/doc/index.rst

@ -0,0 +1,9 @@
===================
Show all messages
===================
Usage
=====
* Open menu ``Discuss / All messages``
* You see all messages

36
mail_all/i18n/de.po

@ -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"

35
mail_all/i18n/es.po

@ -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"

30
mail_all/i18n/mail_all.pot

@ -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 ""

37
mail_all/i18n/sl.po

@ -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"

BIN
mail_all/images/1.jpg

After

Width: 334  |  Height: 171  |  Size: 11 KiB

0
mail_all/models/__init__.py

BIN
mail_all/static/description/1.png

After

Width: 300  |  Height: 270  |  Size: 15 KiB

BIN
mail_all/static/description/2.png

After

Width: 765  |  Height: 400  |  Size: 22 KiB

BIN
mail_all/static/description/icon.png

After

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

82
mail_all/static/description/index.html

@ -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>

60
mail_all/static/src/js/mail_all.js

@ -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;
});

24
mail_all/static/src/xml/menu.xml

@ -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>

3
mail_all/tests/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import test_js

19
mail_all/tests/test_js.py

@ -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"
)

17
mail_all/views/templates.xml

@ -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>

19
mail_archives/README.rst

@ -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
mail_archives/__init__.py

16
mail_archives/__manifest__.py

@ -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,
}

36
mail_archives/i18n/de.po

@ -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"

35
mail_archives/i18n/es.po

@ -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"

30
mail_archives/i18n/mail_archives.pot

@ -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 ""

37
mail_archives/i18n/sl.po

@ -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"

BIN
mail_archives/images/1.jpg

After

Width: 334  |  Height: 171  |  Size: 18 KiB

BIN
mail_archives/static/description/1.png

After

Width: 300  |  Height: 270  |  Size: 24 KiB

BIN
mail_archives/static/description/2.png

After

Width: 765  |  Height: 400  |  Size: 40 KiB

BIN
mail_archives/static/description/icon.png

After

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

82
mail_archives/static/description/index.html

@ -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>

85
mail_archives/static/src/js/archives.js

@ -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;
});

24
mail_archives/static/src/xml/menu.xml

@ -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>

3
mail_archives/tests/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import test_js

22
mail_archives/tests/test_js.py

@ -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",
)

17
mail_archives/views/templates.xml

@ -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>

29
mail_attachment_popup/README.rst

@ -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
mail_attachment_popup/__init__.py

18
mail_attachment_popup/__manifest__.py

@ -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,
}

4
mail_attachment_popup/doc/changelog.rst

@ -0,0 +1,4 @@
`1.0.0`
-------
- Init version

16
mail_attachment_popup/doc/index.rst

@ -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

28
mail_attachment_popup/i18n/de.po

@ -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"

27
mail_attachment_popup/i18n/es.po

@ -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"

22
mail_attachment_popup/i18n/mail_attachment_popup.pot

@ -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 ""

29
mail_attachment_popup/i18n/ru.po

@ -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 "Скачать"

BIN
mail_attachment_popup/images/popup_image.png

After

Width: 749  |  Height: 371  |  Size: 128 KiB

BIN
mail_attachment_popup/static/description/attach_image.png

After

Width: 361  |  Height: 382  |  Size: 63 KiB

BIN
mail_attachment_popup/static/description/download.png

After

Width: 361  |  Height: 381  |  Size: 131 KiB

BIN
mail_attachment_popup/static/description/icon.png

After

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

84
mail_attachment_popup/static/description/index.html

@ -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>

BIN
mail_attachment_popup/static/description/popup.png

After

Width: 365  |  Height: 382  |  Size: 150 KiB

429
mail_attachment_popup/static/lib/js/jquery.arcticmodal.js

@ -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);

43
mail_attachment_popup/static/src/css/jquery.arcticmodal.css

@ -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%;
}

21
mail_attachment_popup/static/src/css/simple.css

@ -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;
}

16
mail_attachment_popup/static/src/css/styles.css

@ -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;
}

BIN
mail_attachment_popup/static/src/img/loading.gif

After

Width: 32  |  Height: 32  |  Size: 3.1 KiB

65
mail_attachment_popup/static/src/xml/mail_attachment_popup.xml

@ -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>

29
mail_attachment_popup/views/mail_attachment_popup_template.xml

@ -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>

26
mail_base/README.rst

@ -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>`_

5
mail_base/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# License MIT (https://opensource.org/licenses/MIT)
from . import models
from . import controllers

19
mail_base/__manifest__.py

@ -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,
}

2
mail_base/controllers/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import main

19
mail_base/controllers/main.py

@ -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)

30
mail_base/doc/changelog.rst

@ -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

4
mail_base/doc/index.rst

@ -0,0 +1,4 @@
Mail Base
=========
To use this module you need either install module that depends on it or create new module.

31
mail_base/i18n/de.po

@ -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"

30
mail_base/i18n/es.po

@ -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"

30
mail_base/i18n/it.po

@ -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"

25
mail_base/i18n/mail_base.pot

@ -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 ""

30
mail_base/i18n/pt.po

@ -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"

30
mail_base/i18n/pt_BR.po

@ -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"

32
mail_base/i18n/ru.po

@ -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 "Сообщение"

33
mail_base/i18n/sl.po

@ -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"

BIN
mail_base/images/mail_base_image.png

After

Width: 750  |  Height: 371  |  Size: 177 KiB

36
mail_base/models.py

@ -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

BIN
mail_base/static/description/icon.png

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

14
mail_base/views/templates.xml

@ -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>

12
mail_move_message/README.rst

@ -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>`_

3
mail_move_message/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import controllers
from . import mail_move_message_models

15
mail_move_message/__manifest__.py

@ -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,
}

2
mail_move_message/controllers/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
from . import main

70
mail_move_message/controllers/main.py

@ -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

9
mail_move_message/data/mail_move_message_data.xml

@ -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>

31
mail_move_message/doc/changelog.rst

@ -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

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save