diff --git a/.DINAR/image/README.md b/.DINAR/image/README.md index 8175f2a..e6e2e05 100644 --- a/.DINAR/image/README.md +++ b/.DINAR/image/README.md @@ -1,2 +1,4 @@ -This folder is attached on image building as `custom/` folder in [doobba](https://github.com/Tecnativa/doodba#image-usage). -Few additional [files](https://github.com/itpp-labs/DINAR/tree/master/embedded-files/.DINAR/image) are attached temporary on image building. +This folder is attached on image building as `custom/` folder in +[doobba](https://github.com/Tecnativa/doodba#image-usage). Few additional +[files](https://github.com/itpp-labs/DINAR/tree/master/embedded-files/.DINAR/image) are +attached temporary on image building. diff --git a/.DINAR/image/src/addons.yaml b/.DINAR/image/src/addons.yaml index 3689f07..9d0e1c7 100644 --- a/.DINAR/image/src/addons.yaml +++ b/.DINAR/image/src/addons.yaml @@ -1,5 +1,4 @@ # see https://github.com/Tecnativa/doodba#optodoocustomsrcaddonsyaml - --- ENV: DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git diff --git a/.eslintrc.yml b/.eslintrc.yml index 9657d44..0b81ecd 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -133,7 +133,7 @@ rules: no-unused-labels: error no-unused-vars: - error - - args: none + - args: none no-use-before-define: error no-useless-call: warn no-useless-computed-key: warn diff --git a/.isort.cfg b/.isort.cfg index 5751c40..249c22f 100644 --- a/.isort.cfg +++ b/.isort.cfg @@ -9,4 +9,4 @@ line_length=88 known_odoo=odoo known_odoo_addons=odoo.addons sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER -known_third_party= +known_third_party=openerp,requests,simplejson diff --git a/.travis.yml b/.travis.yml index 543981e..8e05c39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,27 +11,28 @@ addons: postgresql: "9.5" apt: packages: - - expect-dev # provides unbuffer utility - - python-lxml # because pip installation is slow + - 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" + - 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" + - 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 + - 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 diff --git a/mail_all/__manifest__.py b/mail_all/__manifest__.py index f9b4d39..7405d38 100644 --- a/mail_all/__manifest__.py +++ b/mail_all/__manifest__.py @@ -3,27 +3,19 @@ "name": "Show all messages", "summary": """Checkout all messages where you have access""", "category": "Discuss", - "images": ['images/1.jpg'], - "version": "1.0.0", - + "images": ["images/1.jpg"], + "vesion": "10.0.1.0.0", "author": "IT-Projects LLC, Pavel Romanchenko", "support": "apps@it-projects.info", "website": "https://it-projects.info", "license": "LGPL-3", - 'price': 40.00, - 'currency': 'EUR', - - "depends": [ - "mail_base" - ], + "price": 40.00, + "currency": "EUR", + "depends": ["mail_base"], "external_dependencies": {"python": [], "bin": []}, - "data": [ - "views/templates.xml", - ], - "qweb": [ - "static/src/xml/menu.xml", - ], + "data": ["views/templates.xml"], + "qweb": ["static/src/xml/menu.xml"], "demo": [], - 'installable': True, + "installable": True, "auto_install": False, } diff --git a/mail_all/models/__init__.py b/mail_all/models/__init__.py index 40a96af..e69de29 100644 --- a/mail_all/models/__init__.py +++ b/mail_all/models/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/mail_all/static/src/js/mail_all.js b/mail_all/static/src/js/mail_all.js index 467ac11..7df8d32 100644 --- a/mail_all/static/src/js/mail_all.js +++ b/mail_all/static/src/js/mail_all.js @@ -1,65 +1,60 @@ -odoo.define('mail_all.all', function (require) { -"use strict"; +odoo.define("mail_all.all", function(require) { + "use strict"; -var base_obj = require('mail_base.base'); + var base_obj = require("mail_base.base"); -//------------------------------------------------------------------------------- -var bus = require('bus.bus').bus; -var config = require('web.config'); -var core = require('web.core'); -var data = require('web.data'); -var Model = require('web.Model'); -var session = require('web.session'); -var time = require('web.time'); -var web_client = require('web.web_client'); + // ------------------------------------------------------------------------------- + var core = require("web.core"); -var _lt = core._lt; -//------------------------------------------------------------------------------- + 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'); - }, + 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; + }, + }); - get_domain: function(channel){ - return (channel.id === "channel_all") ? [] : this._super.apply(this, arguments); - } -}); + // 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(){ + 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" + type: "static", }); return $.when(); }); -return base_obj.chat_manager; - + return base_obj.chat_manager; }); diff --git a/mail_all/static/src/xml/menu.xml b/mail_all/static/src/xml/menu.xml index 8ad1bcb..b6d2ee3 100644 --- a/mail_all/static/src/xml/menu.xml +++ b/mail_all/static/src/xml/menu.xml @@ -1,10 +1,15 @@ - +