Skip to content

Commit

Permalink
Merge branch '10.0' of github.com:OCA/server-tools into 10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moylop260 committed Feb 4, 2020
2 parents dd985e5 + 2707b3a commit fed8784
Show file tree
Hide file tree
Showing 230 changed files with 31,653 additions and 212 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Configuration for known file extensions
[*.{css,js,json,less,md,py,rst,sass,scss,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[.eslintrc,*.{json,yml,yaml,rst,md}]
indent_size = 2

# Do not configure editor for libs and autogenerated content
[*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@ env:
matrix:
- LINT_CHECK="1"
- TRANSIFEX="1"
- TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="database_cleanup,auth_session_timeout,auth_brute_force"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="database_cleanup,auth_session_timeout,auth_brute_force"
- TESTS="1" ODOO_REPO="odoo/odoo" EXCLUDE="database_cleanup,auth_session_timeout,auth_brute_force,base_import_odoo,onchange_helper,test_onchange_helper"
- TESTS="1" ODOO_REPO="OCA/OCB" EXCLUDE="database_cleanup,auth_session_timeout,auth_brute_force,base_import_odoo,onchange_helper,test_onchange_helper"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="onchange_helper,test_onchange_helper"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="onchange_helper,test_onchange_helper"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="database_cleanup"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="database_cleanup"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="auth_session_timeout"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="auth_session_timeout"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="auth_brute_force"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="auth_brute_force"
- TESTS="1" ODOO_REPO="odoo/odoo" INCLUDE="base_import_odoo"
- TESTS="1" ODOO_REPO="OCA/OCB" INCLUDE="base_import_odoo"

virtualenv:
system_site_packages: true
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ addon | version | summary
[auth_supplier](auth_supplier/) | 10.0.1.0.0 | Auth Supplier
[auth_totp](auth_totp/) | 10.0.2.0.0 | Allows users to enable MFA and add optional trusted devices
[auth_totp_password_security](auth_totp_password_security/) | 10.0.1.0.0 | auth_totp and password_security compatibility
[auth_user_case_insensitive](auth_user_case_insensitive/) | 10.0.1.0.0 | Makes the user login field case insensitive
[auth_user_case_insensitive](auth_user_case_insensitive/) | 10.0.1.0.1 | Makes the user login field case insensitive
[auto_backup](auto_backup/) | 10.0.1.0.2 | Backups database
[base_cron_exclusion](base_cron_exclusion/) | 10.0.1.0.0 | Allow you to select scheduled actions that should not run simultaneously.
[base_custom_info](base_custom_info/) | 10.0.1.0.0 | Add custom field in models
[base_custom_info](base_custom_info/) | 10.0.1.1.0 | Add custom field in models
[base_directory_file_download](base_directory_file_download/) | 10.0.1.0.0 | Download all files of a directory on server
[base_exception](base_exception/) | 10.0.3.0.2 | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...)
[base_exception](base_exception/) | 10.0.4.1.1 | This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...)
[base_export_manager](base_export_manager/) | 10.0.1.0.0 | Manage model export profiles
[base_export_security](base_export_security/) | 10.0.1.0.0 | Security features for Odoo exports
[base_external_dbsource](base_external_dbsource/) | 10.0.2.0.0 | External Database Sources
Expand All @@ -47,8 +47,9 @@ addon | version | summary
[base_fontawesome](base_fontawesome/) | 10.0.4.7.0 | Up to date Fontawesome resources.
[base_import_default_enable_tracking](base_import_default_enable_tracking/) | 10.0.1.0.0 | This modules simply enables history tracking when doing an import.
[base_import_match](base_import_match/) | 10.0.1.0.0 | Try to avoid duplicates before importing
[base_import_odoo](base_import_odoo/) | 10.0.1.0.0 | Import records from another Odoo instance
[base_import_security_group](base_import_security_group/) | 10.0.1.0.0 | Group-based permissions for importing CSV files
[base_jsonify](base_jsonify/) | 10.0.1.0.0 | Base module that provide the jsonify method on all models
[base_jsonify](base_jsonify/) | 10.0.1.1.0 | Base module that provide the jsonify method on all models
[base_kanban_stage](base_kanban_stage/) | 10.0.1.2.1 | Provides stage model and abstract logic for inheritance
[base_kanban_stage_state](base_kanban_stage_state/) | 10.0.1.0.0 | Maps stages from base_kanban_stage to states
[base_locale_uom_default](base_locale_uom_default/) | 10.0.1.0.0 | This provides settings to select default UoMs at the language level.
Expand All @@ -71,7 +72,7 @@ addon | version | summary
[dbfilter_from_header](dbfilter_from_header/) | 10.0.1.0.0 | Filter databases with HTTP headers
[dead_mans_switch_client](dead_mans_switch_client/) | 10.0.1.0.0 | Be notified when customers' Odoo instances go down
[disable_odoo_online](disable_odoo_online/) | 10.0.1.0.0 | Remove odoo.com Bindings
[fetchmail_attach_from_folder](fetchmail_attach_from_folder/) | 10.0.1.0.0 | Attach mails in an IMAP folder to existing objects
[fetchmail_attach_from_folder](fetchmail_attach_from_folder/) | 10.0.1.1.0 | Attach mails in an IMAP folder to existing objects
[fetchmail_notify_error_to_sender](fetchmail_notify_error_to_sender/) | 10.0.1.0.0 | If fetching mails gives error, send an email to sender
[html_image_url_extractor](html_image_url_extractor/) | 10.0.1.0.0 | Extract images found in any HTML field
[html_text](html_text/) | 10.0.1.0.0 | Generate excerpts from any HTML field
Expand All @@ -83,7 +84,7 @@ addon | version | summary
[mass_sorting](mass_sorting/) | 10.0.1.0.0 | Sort any models by any fields list
[module_auto_update](module_auto_update/) | 10.0.2.0.3 | Automatically update Odoo modules
[module_prototyper](module_prototyper/) | 10.0.1.0.0 | Prototype your module.
[onchange_helper](onchange_helper/) | 10.0.1.0.0 | Technical module that ease execution of onchange in Python code
[onchange_helper](onchange_helper/) | 10.0.3.1.2 | Technical module that ease execution of onchange in Python code
[password_security](password_security/) | 10.0.1.1.4 | Allow admin to set password security requirements.
[res_config_settings_enterprise_remove](res_config_settings_enterprise_remove/) | 10.0.1.0.0 | Remove fields in all settings views marked as enterprise
[scheduler_error_mailer](scheduler_error_mailer/) | 10.0.1.0.0 | Scheduler Error Mailer
Expand All @@ -96,6 +97,7 @@ addon | version | summary
[sql_export](sql_export/) | 10.0.1.0.0 | Export data in csv file with SQL requests
[sql_request_abstract](sql_request_abstract/) | 10.0.1.0.1 | Abstract Model to manage SQL Requests
[subscription_action](subscription_action/) | 10.0.1.0.0 | Run a server action on a newly created document
[test_onchange_helper](test_onchange_helper/) | 10.0.2.1.0 | Test addon for the onchange_helper addon
[user_immutable](user_immutable/) | 10.0.1.0.0 | Add Immutable User Support
[user_threshold](user_threshold/) | 10.0.1.0.1 | Add Configurable User Threshold Support
[users_ldap_groups](users_ldap_groups/) | 10.0.0.0.0 | Adds user accounts to groups based on rules defined by the administrator.
Expand Down
2 changes: 1 addition & 1 deletion auth_user_case_insensitive/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Case Insensitive Logins",
"summary": "Makes the user login field case insensitive",
"version": "10.0.1.0.0",
"version": "10.0.1.0.1",
"category": "Authentication",
"website": "https://laslabs.com/",
"author": "LasLabs, Odoo Community Association (OCA)",
Expand Down
21 changes: 20 additions & 1 deletion auth_user_case_insensitive/models/res_users.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2015-2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

import collections
from odoo import api, fields, models


Expand Down Expand Up @@ -32,3 +32,22 @@ def write(self, vals):
if vals.get('login'):
vals['login'] = vals['login'].lower()
return super(ResUsers, self).write(vals)

@api.model
def search(self, args, offset=0, limit=None, order=None, count=False):
"""Modifies all search domains to replace login with login.lower()."""
new_args = []
for arg in args:
new_arg = arg
if len(arg) == 3 and arg[0] == 'login':
new_rvalue = arg[2]
if hasattr(arg[2], 'lower'):
new_rvalue = arg[2].lower()
elif isinstance(arg[2], collections.Iterable):
new_rvalue = [getattr(
x, 'lower', lambda: x)() for x in arg[2]]
new_arg = (new_arg[0], new_arg[1], new_rvalue)
new_args.append(new_arg)
return super(ResUsers, self).search(
args=new_args, offset=offset, limit=limit,
order=order, count=count)
2 changes: 1 addition & 1 deletion base_custom_info/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'name': "Base Custom Info",
'summary': "Add custom field in models",
'category': 'Tools',
'version': '10.0.1.0.0',
'version': '10.0.1.1.0',
'depends': [
'base_setup',
],
Expand Down
26 changes: 16 additions & 10 deletions base_custom_info/models/custom_info_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ def _onchange_model(self):
self._inverse_model()

@api.multi
@api.constrains("model_id")
def _check_model(self):
"""Avoid error when updating base module and a submodule extends a
model that falls out of this one's dependency graph.
def _check_model_update_allowed(self, model_id):
"""Check if the template's model can be updated.
Template can be updated only if no property values already exists for
this template
"""
for record in self:
with self.env.norecompute():
oldmodels = record.mapped("property_ids.info_value_ids.model")
if oldmodels and record.model not in oldmodels:
raise ValidationError(
_("You cannot change the model because it is in use.")
)
if (model_id != record.model_id.id
and record.mapped("property_ids.info_value_ids")):
raise ValidationError(
_("You cannot change the model because it is in use.")
)

@api.multi
def check_access_rule(self, operation):
Expand All @@ -74,3 +74,9 @@ def check_access_rule(self, operation):
model.check_access_rights(operation)
model.check_access_rule(operation)
return super(CustomInfoTemplate, self).check_access_rule(operation)

@api.multi
def write(self, vals):
if 'model_id' in vals:
self._check_model_update_allowed(vals['model_id'])
return super(CustomInfoTemplate, self).write(vals)
2 changes: 1 addition & 1 deletion base_directory_file_download/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Directory Files Download</title>
<style type="text/css">

Expand Down
2 changes: 1 addition & 1 deletion base_exception/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{'name': 'Exception Rule',
'version': '10.0.3.0.2',
'version': '10.0.4.1.1',
'category': 'Generic Modules',
'summary': """This module provide an abstract model to manage customizable
exceptions to be applied on different models (sale order, invoice, ...)""",
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/am.po
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/ar.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/base_exception.pot
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid "Error when evaluating the exception.rule rule:\n"
" %s \n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/bg.po
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/bs.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/ca.po
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/da.po
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/el_GR.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/en_GB.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_AR.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_CL.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_CO.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_CR.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_DO.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_EC.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_MX.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_PE.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down
2 changes: 1 addition & 1 deletion base_exception/i18n/es_PY.po
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ msgid "Domain"
msgstr ""

#. module: base_exception
#: code:addons/base_exception/models/base_exception.py:151
#: code:addons/base_exception/models/base_exception.py:170
#, python-format
msgid ""
"Error when evaluating the exception.rule rule:\n"
Expand Down

0 comments on commit fed8784

Please sign in to comment.