Skip to content
Permalink
Browse files

Merge PR #1646 into 8.0

Signed-off-by pedrobaeza
  • Loading branch information...
OCA-git-bot committed Aug 14, 2019
2 parents 20dd9b7 + 5da26f8 commit 083a9787f6654431be0baa2f9a23162c66d59c20
@@ -6,23 +6,18 @@ python:
- "2.7"

addons:
postgresql: "9.3" # minimal postgresql version for the base_import_security_group module
# more info: https://github.com/OCA/maintainer-quality-tools/issues/432
postgresql: "9.6"
apt:
packages:
- expect-dev # provides unbuffer utility
- python-lxml # because pip installation is slow

env:
global:
- VERSION="8.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0"
- TRANSIFEX_USER='transbot@odoo-community.org'
- secure: Z06mZCN+Hm3myqHSOZpOOk1pd4oq1epAWZv6m9OX2bTNHbhyOVOGK6JWWsnDm/3DUCN1ZeLtSGOl9bvQfMa8ahQHA80MkLL16YlTvQV59Lh+L2gAYmxX+ogJCJgeQSVAXlGLscgkADCu/HzDlmatrDeROMtULn5i23j2qcyUNyM=
- VERSION="8.0" TESTS="0" LINT_CHECK="0" MAKEPOT="0"

matrix:
- LINT_CHECK="1"
- TRANSIFEX="1"
- TESTS="1" ODOO_REPO="odoo/odoo"
- TESTS="1" ODOO_REPO="odoo/odoo" MAKEPOT="1"
- TESTS="1" ODOO_REPO="OCA/OCB"

virtualenv:
@@ -23,6 +23,11 @@ msgstr ""
msgid "Attachment Name"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,website_url:0
msgid "Attachment URL"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,attachment_id:0
msgid "Attachment id"
@@ -70,6 +75,11 @@ msgstr ""
msgid "Database Data"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,datas_checksum:0
msgid "Datas checksum"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,description:0
msgid "Description"
@@ -100,6 +110,11 @@ msgstr ""
msgid "File Size"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,file_type_icon:0
msgid "File Type Icon"
msgstr ""

#. module: attachment_metadata
#: code:addons/attachment_metadata/models/attachment.py:43
#, python-format
@@ -169,6 +184,11 @@ msgstr ""
msgid "Meta data Attachments"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,mimetype:0
msgid "Mime Type"
msgstr ""

#. module: attachment_metadata
#: view:ir.attachment.metadata:attachment_metadata.view_external_attachment_search
msgid "My Document(s)"
@@ -179,6 +199,11 @@ msgstr ""
msgid "Owner"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,datas_big:0
msgid "Resized file content"
msgstr ""

#. module: attachment_metadata
#: field:ir.attachment.metadata,res_id:0
msgid "Resource ID"
@@ -25,8 +25,7 @@
from openerp import http
from openerp.http import request
from openerp.addons.web.controllers import main
from openerp.addons.auth_from_http_remote_user.model import \
AuthFromHttpRemoteUserInstalled
from ..model import AuthFromHttpRemoteUserInstalled
from .. import utils

import random
@@ -23,7 +23,7 @@
from openerp.osv import orm, fields
from openerp import SUPERUSER_ID
import openerp.exceptions
from openerp.addons.auth_from_http_remote_user import utils
from . import utils


class res_users(orm.Model):
@@ -23,6 +23,7 @@
"version": "8.0.1.1.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"category": "Specific Module",
"license": "AGPL-3",
"description": """
Module to regroup all workarounds/fixes to avoid concurrency issues in SQL.
@@ -50,6 +50,7 @@ def cron_sync_login_date(self, cr, uid, context=None):
cr.execute("UPDATE res_users SET login_date = "
"(SELECT login_dt FROM res_users_login "
"WHERE res_users_login.user_id = res_users.id)")
# pylint: disable=invalid-commit
cr.commit()
except Exception as e:
cr.rollback()
@@ -123,6 +124,7 @@ def _login(self, db, login, password):
cr.execute("INSERT INTO res_users_login "
"(user_id, login_dt) "
"VALUES (%s, now())", (user_id,))
# pylint: disable=invalid-commit
cr.commit()
except psycopg2.OperationalError:
_logger.warning("Failed to update last_login "
@@ -3,6 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import api, SUPERUSER_ID
from psycopg2.extensions import AsIs
import logging

_logger = logging.getLogger(__name__)
@@ -39,7 +40,7 @@ def pre_init_hook_for_submodules(cr, model, field):
%(table)s
WHERE
%(field)s IS NOT NULL
""" % {"table": env[model]._table, "field": field},
""", {"table": AsIs(env[model]._table), "field": AsIs(field)},
(model,)
)

@@ -117,7 +117,7 @@ msgid "Last Updated on"
msgstr ""

#. module: base_multi_image
#: code:addons/base_multi_image/models/owner.py:73
#: code:addons/base_multi_image/models/owner.py:79
#: field:base_multi_image.owner,image_main:0
#, python-format
msgid "Main image"
@@ -215,3 +215,21 @@ msgstr ""
msgid "URL"
msgstr ""

#. module: base_multi_image
#: code:addons/base_multi_image/models/image.py:173
#, python-format
msgid "You must provide a file path for the image."
msgstr ""

#. module: base_multi_image
#: code:addons/base_multi_image/models/image.py:167
#, python-format
msgid "You must provide an URL for the image."
msgstr ""

#. module: base_multi_image
#: code:addons/base_multi_image/models/image.py:179
#, python-format
msgid "You must provide an attached file for the image."
msgstr ""

@@ -47,16 +47,19 @@ class Image(models.Model):
'Image remote URL')
image_main = fields.Binary(
"Full-sized image",
# pylint: disable=method-compute
compute="_get_image")
image_medium = fields.Binary(
"Medium-sized image",
# pylint: disable=method-compute
compute="_get_image_sizes",
help="Medium-sized image. It is automatically resized as a "
"128 x 128 px image, with aspect ratio preserved, only when the "
"image exceeds one of those sizes. Use this field in form views "
"or kanban views.")
image_small = fields.Binary(
"Small-sized image",
# pylint: disable=method-compute
compute="_get_image_sizes",
help="Small-sized image. It is automatically resized as a 64 x 64 px "
"image, with aspect ratio preserved. Use this field anywhere a "
@@ -67,6 +70,7 @@ class Image(models.Model):
sequence = fields.Integer(
default=10)
show_technical = fields.Boolean(
# pylint: disable=method-compute
compute="_show_technical")

@api.multi
@@ -160,17 +164,17 @@ def _onchange_filename(self):
@api.constrains('storage', 'url')
def _check_url(self):
if self.storage == 'url' and not self.url:
raise exceptions.ValidationError(
'You must provide an URL for the image.')
raise exceptions.ValidationError(_(
'You must provide an URL for the image.'))

@api.constrains('storage', 'path')
def _check_path(self):
if self.storage == 'file' and not self.path:
raise exceptions.ValidationError(
'You must provide a file path for the image.')
raise exceptions.ValidationError(_(
'You must provide a file path for the image.'))

@api.constrains('storage', 'file_db_store')
def _check_store(self):
if self.storage == 'db' and not self.file_db_store:
raise exceptions.ValidationError(
'You must provide an attached file for the image.')
raise exceptions.ValidationError(_(
'You must provide an attached file for the image.'))
@@ -19,16 +19,22 @@ class Owner(models.AbstractModel):
image_main = fields.Binary(
string="Main image",
store=False,
# pylint: disable=method-compute
compute="_get_multi_image",
# pylint: disable=method-inverse
inverse="_set_multi_image_main")
image_main_medium = fields.Binary(
string="Medium image",
# pylint: disable=method-compute
compute="_get_multi_image",
# pylint: disable=method-inverse
inverse="_set_multi_image_main_medium",
store=False)
image_main_small = fields.Binary(
string="Small image",
# pylint: disable=method-compute
compute="_get_multi_image",
# pylint: disable=method-inverse
inverse="_set_multi_image_main_small",
store=False)

@@ -86,6 +86,11 @@ msgstr ""
msgid "Group Name"
msgstr ""

#. module: base_user_role
#: help:res.users.role,share:0
msgid "Group created to set access rights for sharing data with some users."
msgstr ""

#. module: base_user_role
#: view:res.users.role:base_user_role.view_res_users_role_form
msgid "Groups"
@@ -97,6 +102,11 @@ msgstr ""
msgid "ID"
msgstr ""

#. module: base_user_role
#: help:res.users.role,is_portal:0
msgid "If checked, this group is usable as a portal."
msgstr ""

#. module: base_user_role
#: field:res.users.role,implied_ids:0
msgid "Inherits"
@@ -125,6 +135,11 @@ msgstr ""
msgid "Name"
msgstr ""

#. module: base_user_role
#: field:res.users.role,is_portal:0
msgid "Portal"
msgstr ""

#. module: base_user_role
#: view:res.users.role:base_user_role.view_res_users_role_form
#: view:res.users.role:base_user_role.view_res_users_role_tree
@@ -151,6 +166,11 @@ msgstr ""
msgid "Rules"
msgstr ""

#. module: base_user_role
#: field:res.users.role,share:0
msgid "Share Group"
msgstr ""

#. module: base_user_role
#: help:res.users.role,dynamic_group_condition:0
msgid "The condition to be met for a user to be a member of this group. It is evaluated as python code at login time, you get `user` passed as a browse record"
@@ -206,13 +206,13 @@ msgid "No dangling menu entries found"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_modules.py:127
#: code:addons/database_cleanup/model/purge_modules.py:128
#, python-format
msgid "No modules found to purge"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_columns.py:151
#: code:addons/database_cleanup/model/purge_columns.py:152
#, python-format
msgid "No orphaned columns found"
msgstr ""
@@ -224,24 +224,24 @@ msgid "No orphaned data entries found"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_models.py:148
#: code:addons/database_cleanup/model/purge_models.py:149
#, python-format
msgid "No orphaned models found"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_tables.py:133
#: code:addons/database_cleanup/model/purge_tables.py:134
#, python-format
msgid "No orphaned tables found"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_columns.py:150
#: code:addons/database_cleanup/model/purge_columns.py:151
#: code:addons/database_cleanup/model/purge_data.py:99
#: code:addons/database_cleanup/model/purge_menus.py:73
#: code:addons/database_cleanup/model/purge_models.py:147
#: code:addons/database_cleanup/model/purge_modules.py:126
#: code:addons/database_cleanup/model/purge_tables.py:132
#: code:addons/database_cleanup/model/purge_models.py:148
#: code:addons/database_cleanup/model/purge_modules.py:127
#: code:addons/database_cleanup/model/purge_tables.py:133
#, python-format
msgid "Nothing to do"
msgstr ""
@@ -297,7 +297,7 @@ msgid "Purge all tables"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_columns.py:89
#: code:addons/database_cleanup/model/purge_columns.py:90
#: view:cleanup.purge.line.column:database_cleanup.purge_column_line_tree
#: view:cleanup.purge.wizard.column:database_cleanup.purge_columns_view
#: model:ir.actions.server,name:database_cleanup.action_purge_columns
@@ -327,7 +327,7 @@ msgid "Purge menus"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_models.py:133
#: code:addons/database_cleanup/model/purge_models.py:134
#: view:cleanup.purge.line.model:database_cleanup.purge_model_line_tree
#: view:cleanup.purge.wizard.model:database_cleanup.purge_models_view
#: model:ir.actions.server,name:database_cleanup.action_purge_models
@@ -336,7 +336,7 @@ msgid "Purge models"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_modules.py:104
#: code:addons/database_cleanup/model/purge_modules.py:105
#: view:cleanup.purge.line.module:database_cleanup.purge_module_line_tree
#: view:cleanup.purge.wizard.module:database_cleanup.purge_modules_view
#: model:ir.actions.server,name:database_cleanup.action_purge_modules
@@ -375,7 +375,7 @@ msgid "Purge obsolete tables"
msgstr ""

#. module: database_cleanup
#: code:addons/database_cleanup/model/purge_tables.py:96
#: code:addons/database_cleanup/model/purge_tables.py:97
#: view:cleanup.purge.line.table:database_cleanup.purge_table_line_tree
#: view:cleanup.purge.wizard.table:database_cleanup.purge_tables_view
#: model:ir.actions.server,name:database_cleanup.action_purge_tables
@@ -68,6 +68,7 @@ def purge(self, cr, uid, ids, context=None):
IdentifierAdapter(line.name),
))
line.write({'purged': True})
# pylint: disable=invalid-commit
cr.commit()
return True

@@ -118,6 +118,7 @@ def purge(self, cr, uid, ids, context=None):
context=local_context)
model_pool.unlink(cr, uid, [row[0]], context=local_context)
line.write({'purged': True})
# pylint: disable=invalid-commit
cr.commit()
return True

0 comments on commit 083a978

Please sign in to comment.
You can’t perform that action at this time.