Compare commits
merge into: bgallet:12.0
bgallet:10.0
bgallet:12.0
bgallet:12.0-patch-get-request-odoo
bgallet:13.0
bgallet:14.0
bgallet:14.0-patch-get-request-odoo
bgallet:16.0
bgallet:v12_initial_fix
Myceliandre:10.0
Myceliandre:12.0
Myceliandre:13.0
Myceliandre:14.0
Myceliandre:16.0
Myceliandre:v12_initial_fix
pull from: bgallet:13.0
bgallet:10.0
bgallet:12.0
bgallet:12.0-patch-get-request-odoo
bgallet:13.0
bgallet:14.0
bgallet:14.0-patch-get-request-odoo
bgallet:16.0
bgallet:v12_initial_fix
Myceliandre:10.0
Myceliandre:12.0
Myceliandre:13.0
Myceliandre:14.0
Myceliandre:16.0
Myceliandre:v12_initial_fix
3 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Nicolas JEUDY | 67338a9c19 |
[FIX] add openid connect debug
|
4 years ago |
Nicolas JEUDY | c6e30a34b5 |
[MIG] 13.0 initial working version for openid_connect
|
4 years ago |
Nicolas JEUDY | df0777e6b2 |
[MIG] 13.0 migration
|
4 years ago |
38 changed files with 641 additions and 672 deletions
-
1galicea_base/__init__.py
-
29galicea_base/__manifest__.py
-
3galicea_base/views/base_menu.xml
-
2galicea_environment_checkup/__init__.py
-
41galicea_environment_checkup/__manifest__.py
-
2galicea_environment_checkup/controllers/__init__.py
-
15galicea_environment_checkup/controllers/dashboard.py
-
2galicea_environment_checkup/environment_checkup/__init__.py
-
21galicea_environment_checkup/environment_checkup/core.py
-
13galicea_environment_checkup/environment_checkup/custom.py
-
116galicea_environment_checkup/environment_checkup/dependencies.py
-
18galicea_environment_checkup/environment_checkup/runtime.py
-
10galicea_environment_checkup/models/ext_module.py
-
3galicea_openapi/__init__.py
-
36galicea_openapi/__manifest__.py
-
2galicea_openapi/controllers/__init__.py
-
44galicea_openapi/controllers/api.py
-
3galicea_openapi/models/__init__.py
-
9galicea_openapi/openapi.py
-
3galicea_openid_connect/__init__.py
-
73galicea_openid_connect/__manifest__.py
-
89galicea_openid_connect/api.py
-
2galicea_openid_connect/controllers/__init__.py
-
20galicea_openid_connect/controllers/ext_web_login.py
-
440galicea_openid_connect/controllers/main.py
-
33galicea_openid_connect/hooks.py
-
2galicea_openid_connect/models/__init__.py
-
44galicea_openid_connect/models/access_token.py
-
56galicea_openid_connect/models/client.py
-
44galicea_openid_connect/models/config_parameter.py
-
9galicea_openid_connect/random_tokens.py
-
23galicea_openid_connect/security/__init__.py
-
8galicea_openid_connect/security/init.xml
-
4galicea_openid_connect/security/init.yml
-
24galicea_openid_connect/system_checks.py
-
33galicea_openid_connect/views/views.xml
-
25galicea_toolset/__manifest__.py
-
5galicea_toolset/utils.py
@ -1,2 +1 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
@ -1,23 +1,14 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
{ |
{ |
||||
'name': "Base menu for Odoo Galicea Ecosystem", |
|
||||
|
|
||||
'summary': """ |
|
||||
|
"name": "Base menu for Odoo Galicea Ecosystem", |
||||
|
"summary": """ |
||||
Menu only |
Menu only |
||||
""", |
""", |
||||
|
|
||||
'author': "Jurek Wawro", |
|
||||
'maintainer': "Galicea", |
|
||||
'website': "http://galicea.pl", |
|
||||
|
|
||||
'category': 'Technical Settings', |
|
||||
'version': '12.0.1.0', |
|
||||
|
|
||||
'depends': ['web',], |
|
||||
|
|
||||
'data': [ |
|
||||
'views/base_menu.xml', |
|
||||
], |
|
||||
|
|
||||
'installable': True |
|
||||
|
"author": "Jurek Wawro", |
||||
|
"maintainer": "Galicea", |
||||
|
"website": "http://galicea.pl", |
||||
|
"category": "Technical Settings", |
||||
|
"version": "13.0.1.0", |
||||
|
"depends": ["web",], |
||||
|
"data": ["views/base_menu.xml",], |
||||
|
"installable": True, |
||||
} |
} |
@ -1,6 +1,5 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<menuitem name="Galicea" id="galicea_admin_menu" |
<menuitem name="Galicea" id="galicea_admin_menu" |
||||
parent="base.menu_administration" groups="base.group_erp_manager" /> |
|
||||
|
|
||||
|
parent="base.menu_administration" groups="base.group_erp_manager" /> |
||||
</odoo> |
</odoo> |
@ -1,32 +1,19 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
{ |
{ |
||||
'name': "Galicea Environment Check-up", |
|
||||
|
|
||||
'summary': """ |
|
||||
|
"name": "Galicea Environment Check-up", |
||||
|
"summary": """ |
||||
Programmatically validate environment, including internal and external |
Programmatically validate environment, including internal and external |
||||
dependencies""", |
dependencies""", |
||||
|
|
||||
'author': "Maciej Wawro", |
|
||||
'maintainer': "Galicea", |
|
||||
'website': "http://galicea.pl", |
|
||||
|
|
||||
'category': 'Technical Settings', |
|
||||
'version': '12.0.1.0', |
|
||||
|
|
||||
'depends': ['web','galicea_base',], |
|
||||
|
|
||||
'data': [ |
|
||||
'views/data.xml', |
|
||||
'views/views.xml', |
|
||||
'views/environment_checks.xml' |
|
||||
|
"author": "Maciej Wawro", |
||||
|
"maintainer": "Galicea", |
||||
|
"website": "http://galicea.pl", |
||||
|
"category": "Technical Settings", |
||||
|
"version": "13.0.1.0", |
||||
|
"depends": ["web", "galicea_base",], |
||||
|
"data": ["views/data.xml", "views/views.xml", "views/environment_checks.xml"], |
||||
|
"qweb": ["static/src/xml/templates.xml"], |
||||
|
"images": [ |
||||
|
"static/description/images/custom_screenshot.png", |
||||
|
"static/description/images/dependencies_screenshot.png", |
||||
], |
], |
||||
|
|
||||
'qweb': ['static/src/xml/templates.xml'], |
|
||||
|
|
||||
'images': [ |
|
||||
'static/description/images/custom_screenshot.png', |
|
||||
'static/description/images/dependencies_screenshot.png' |
|
||||
], |
|
||||
|
|
||||
'installable': True |
|
||||
|
"installable": True, |
||||
} |
} |
@ -1,3 +1 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import dashboard |
from . import dashboard |
@ -1,4 +1,2 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import core |
from . import core |
||||
from . import custom |
from . import custom |
@ -1,19 +1,15 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
import json |
import json |
||||
from odoo import api, fields, models |
from odoo import api, fields, models |
||||
|
|
||||
from ..environment_checkup import dependencies |
from ..environment_checkup import dependencies |
||||
from ..environment_checkup.runtime import display_data |
from ..environment_checkup.runtime import display_data |
||||
|
|
||||
|
|
||||
class Module(models.Model): |
class Module(models.Model): |
||||
_inherit = 'ir.module.module' |
|
||||
|
_inherit = "ir.module.module" |
||||
|
|
||||
dependency_checks = fields.Text( |
|
||||
compute='_compute_dependency_checks' |
|
||||
) |
|
||||
|
dependency_checks = fields.Text(compute="_compute_dependency_checks") |
||||
|
|
||||
@api.one |
|
||||
def _compute_dependency_checks(self): |
def _compute_dependency_checks(self): |
||||
checks = dependencies.get_checks_for_module_recursive(self) |
checks = dependencies.get_checks_for_module_recursive(self) |
||||
self.dependency_checks = json.dumps(display_data(self.env, checks)) |
self.dependency_checks = json.dumps(display_data(self.env, checks)) |
@ -1,5 +1,2 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
#from . import models |
|
||||
from . import controllers |
from . import controllers |
||||
|
|
@ -1,33 +1,23 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
{ |
{ |
||||
'name': "openapi", |
|
||||
|
|
||||
'summary': """ |
|
||||
|
"name": "openapi", |
||||
|
"summary": """ |
||||
Odoo Opnapi |
Odoo Opnapi |
||||
UWAGA! Obecnie dekorator apiroute ma ograniczoną funkcjonalność. |
UWAGA! Obecnie dekorator apiroute ma ograniczoną funkcjonalność. |
||||
M.in. tylko jeden URL |
M.in. tylko jeden URL |
||||
controllers/api.py zawiera przykład wykorzystania - |
controllers/api.py zawiera przykład wykorzystania - |
||||
pod adresem /oapi/api zwraca dokumentację w JSON |
pod adresem /oapi/api zwraca dokumentację w JSON |
||||
""", |
""", |
||||
|
|
||||
'description': """ |
|
||||
|
"description": """ |
||||
|
|
||||
""", |
""", |
||||
|
|
||||
'author': 'Jerzy Wawro', |
|
||||
'maintainer': "Galicea", |
|
||||
'website': "http://www.galicea.pl", |
|
||||
'category': 'Tools', |
|
||||
'version': '12.0.0.1', |
|
||||
|
|
||||
'depends': [ |
|
||||
], |
|
||||
'external_dependencies': { |
|
||||
'python': [ 'fastapi', 'pydantic', 'starlette' ] |
|
||||
}, |
|
||||
'data': [ |
|
||||
], |
|
||||
'application': True, |
|
||||
'installable': True, |
|
||||
|
|
||||
|
"author": "Jerzy Wawro", |
||||
|
"maintainer": "Galicea", |
||||
|
"website": "http://www.galicea.pl", |
||||
|
"category": "Tools", |
||||
|
"version": "13.0.0.1", |
||||
|
"depends": [], |
||||
|
"external_dependencies": {"python": ["fastapi", "pydantic", "starlette"]}, |
||||
|
"data": [], |
||||
|
"application": True, |
||||
|
"installable": True, |
||||
} |
} |
@ -1,4 +1,2 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import api |
from . import api |
||||
|
|
@ -1,3 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
|
|
@ -1,7 +1,6 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import controllers |
from . import controllers |
||||
from . import models |
from . import models |
||||
from . import system_checks |
from . import system_checks |
||||
|
|
||||
from . import api |
from . import api |
||||
|
from .hooks import init_keys |
@ -1,51 +1,38 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
{ |
{ |
||||
'name': "Galicea OpenID Connect Provider", |
|
||||
|
|
||||
'summary': """OpenID Connect Provider and OAuth2 resource server""", |
|
||||
|
|
||||
'author': "Maciej Wawro", |
|
||||
'maintainer': "Galicea", |
|
||||
'website': "http://galicea.pl", |
|
||||
|
|
||||
'category': 'Technical Settings', |
|
||||
'version': '12.0.0.0', |
|
||||
|
|
||||
'depends': ['web', 'galicea_environment_checkup', 'galicea_base' ], |
|
||||
|
|
||||
'external_dependencies': { |
|
||||
'python': ['jwcrypto', 'cryptography'] |
|
||||
}, |
|
||||
|
|
||||
'data': [ |
|
||||
'security/security.xml', |
|
||||
'security/ir.model.access.csv', |
|
||||
# 'security/init.yml', |
|
||||
'security/init.xml', |
|
||||
'views/views.xml', |
|
||||
'views/templates.xml' |
|
||||
|
"name": "Galicea OpenID Connect Provider", |
||||
|
"summary": """OpenID Connect Provider and OAuth2 resource server""", |
||||
|
"author": "Maciej Wawro", |
||||
|
"maintainer": "Galicea", |
||||
|
"website": "http://galicea.pl", |
||||
|
"category": "Technical Settings", |
||||
|
"version": "13.0.0.0", |
||||
|
"depends": ["web", "galicea_environment_checkup", "galicea_base"], |
||||
|
"external_dependencies": {"python": ["jwcrypto", "cryptography"]}, |
||||
|
"data": [ |
||||
|
"security/security.xml", |
||||
|
"security/ir.model.access.csv", |
||||
|
# 'security/init.yml', |
||||
|
# "security/init.xml", |
||||
|
"views/views.xml", |
||||
|
"views/templates.xml", |
||||
], |
], |
||||
|
|
||||
'environment_checkup': { |
|
||||
'dependencies': { |
|
||||
'python': [ |
|
||||
|
"environment_checkup": { |
||||
|
"dependencies": { |
||||
|
"python": [ |
||||
|
{"name": "jwcrypto", "install": "pip install 'jwcrypto==0.5.0'"}, |
||||
{ |
{ |
||||
'name': 'jwcrypto', |
|
||||
'install': "pip install 'jwcrypto==0.5.0'" |
|
||||
|
"name": "cryptography", |
||||
|
"version": ">=2.3", |
||||
|
"install": "pip install 'cryptography>=2.3'", |
||||
}, |
}, |
||||
{ |
|
||||
'name': 'cryptography', |
|
||||
'version': '>=2.3', |
|
||||
'install': "pip install 'cryptography>=2.3'" |
|
||||
} |
|
||||
] |
] |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
'images': [ |
|
||||
'static/description/images/master_screenshot.png', |
|
||||
'static/description/images/client_screenshot.png', |
|
||||
'static/description/images/login_screenshot.png', |
|
||||
'static/description/images/error_screenshot.png' |
|
||||
] |
|
||||
|
"post_init_hook": "init_keys", |
||||
|
"images": [ |
||||
|
"static/description/images/master_screenshot.png", |
||||
|
"static/description/images/client_screenshot.png", |
||||
|
"static/description/images/login_screenshot.png", |
||||
|
"static/description/images/error_screenshot.png", |
||||
|
], |
||||
} |
} |
@ -1,4 +1,2 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import ext_web_login |
from . import ext_web_login |
||||
from . import main |
from . import main |
@ -1,17 +1,21 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
|
import logging |
||||
import time |
import time |
||||
|
|
||||
from odoo import http |
from odoo import http |
||||
from odoo.addons import web |
from odoo.addons import web |
||||
|
|
||||
class Home(web.controllers.main.Home): |
|
||||
|
_logger = logging.getLogger(__name__) |
||||
|
|
||||
@http.route('/web/login', type='http', auth="none") |
|
||||
|
|
||||
|
class Home(web.controllers.main.Home): |
||||
|
@http.route("/web/login", type="http", auth="none") |
||||
def web_login(self, redirect=None, **kw): |
def web_login(self, redirect=None, **kw): |
||||
|
_logger.debug("#### OPENID (0)") |
||||
result = super(Home, self).web_login(redirect, **kw) |
result = super(Home, self).web_login(redirect, **kw) |
||||
if result.is_qweb and 'force_auth_and_redirect' in kw: |
|
||||
result.qcontext['redirect'] = kw['force_auth_and_redirect'] |
|
||||
if http.request.params.get('login_success'): |
|
||||
http.request.session['auth_time'] = int(time.time()) |
|
||||
|
_logger.debug("#### OPENID (1): %s" % result) |
||||
|
if result.is_qweb and "force_auth_and_redirect" in kw: |
||||
|
result.qcontext["redirect"] = kw["force_auth_and_redirect"] |
||||
|
if http.request.params.get("login_success"): |
||||
|
http.request.session["auth_time"] = int(time.time()) |
||||
|
_logger.debug("#### OPENID (2): %s" % http.request.session) |
||||
return result |
return result |
@ -0,0 +1,33 @@ |
|||||
|
from odoo import api, SUPERUSER_ID |
||||
|
from . import random_tokens |
||||
|
|
||||
|
try: |
||||
|
from jwcrypto import jwk |
||||
|
except ImportError: |
||||
|
pass |
||||
|
|
||||
|
|
||||
|
def init_keys(cr, registry): |
||||
|
env = api.Environment(cr, SUPERUSER_ID, {}) |
||||
|
keys = { |
||||
|
"galicea_openid_connect.authorization_code_jwk": lambda: jwk.JWK.generate( |
||||
|
kty="oct", |
||||
|
size=256, |
||||
|
kid=random_tokens.alpha_numeric(16), |
||||
|
use="sig", |
||||
|
alg="HS256", |
||||
|
).export(), |
||||
|
"galicea_openid_connect.id_token_jwk": lambda: jwk.JWK.generate( |
||||
|
kty="RSA", |
||||
|
size=2054, |
||||
|
kid=random_tokens.alpha_numeric(16), |
||||
|
use="sig", |
||||
|
alg="RS256", |
||||
|
).export(), |
||||
|
} |
||||
|
|
||||
|
for key, gen in keys.items(): |
||||
|
if not env["ir.config_parameter"].search([("key", "=", key)]): |
||||
|
env["ir.config_parameter"].create( |
||||
|
{"key": key, "value": gen(),} |
||||
|
) |
@ -1,5 +1,3 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from . import client |
from . import client |
||||
from . import access_token |
from . import access_token |
||||
from . import config_parameter |
from . import config_parameter |
@ -1,28 +1,36 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from odoo import models, fields, api |
from odoo import models, fields, api |
||||
from .. import random_tokens |
from .. import random_tokens |
||||
|
|
||||
try: |
try: |
||||
from jwcrypto import jwk |
from jwcrypto import jwk |
||||
except ImportError: |
except ImportError: |
||||
pass |
pass |
||||
|
|
||||
|
|
||||
class ConfigParameter(models.Model): |
class ConfigParameter(models.Model): |
||||
_inherit = 'ir.config_parameter' |
|
||||
|
_inherit = "ir.config_parameter" |
||||
|
|
||||
@api.model |
|
||||
def openid_init_keys(self): |
|
||||
keys = { |
|
||||
'galicea_openid_connect.authorization_code_jwk': lambda: \ |
|
||||
jwk.JWK.generate(kty='oct', size=256, kid=random_tokens.alpha_numeric(16), use='sig', alg='HS256').export(), |
|
||||
'galicea_openid_connect.id_token_jwk': lambda: \ |
|
||||
jwk.JWK.generate(kty='RSA', size=2054, kid=random_tokens.alpha_numeric(16), use='sig', alg='RS256').export() |
|
||||
} |
|
||||
|
@api.model |
||||
|
def openid_init_keys(self): |
||||
|
keys = { |
||||
|
"galicea_openid_connect.authorization_code_jwk": lambda: jwk.JWK.generate( |
||||
|
kty="oct", |
||||
|
size=256, |
||||
|
kid=random_tokens.alpha_numeric(16), |
||||
|
use="sig", |
||||
|
alg="HS256", |
||||
|
).export(), |
||||
|
"galicea_openid_connect.id_token_jwk": lambda: jwk.JWK.generate( |
||||
|
kty="RSA", |
||||
|
size=2054, |
||||
|
kid=random_tokens.alpha_numeric(16), |
||||
|
use="sig", |
||||
|
alg="RS256", |
||||
|
).export(), |
||||
|
} |
||||
|
|
||||
for key, gen in iter(keys.items()): |
|
||||
if not self.search([('key', '=', key)]): |
|
||||
self.create({ |
|
||||
'key': key, |
|
||||
'value': gen(), |
|
||||
'group_ids': [(4, self.env.ref('base.group_erp_manager').id)] |
|
||||
}) |
|
||||
|
for key, gen in iter(keys.items()): |
||||
|
if not self.search([("key", "=", key)]): |
||||
|
self.create( |
||||
|
{"key": key, "value": gen(),} |
||||
|
) |
@ -1,14 +1,15 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from random import SystemRandom |
from random import SystemRandom |
||||
|
|
||||
|
|
||||
def random_token(length, byte_filter): |
def random_token(length, byte_filter): |
||||
allowed_bytes = ''.join(c for c in map(chr, range(128)) if byte_filter(c)) |
|
||||
|
allowed_bytes = "".join(c for c in map(chr, range(128)) if byte_filter(c)) |
||||
random = SystemRandom() |
random = SystemRandom() |
||||
return ''.join([random.choice(allowed_bytes) for _ in range(length)]) |
|
||||
|
return "".join([random.choice(allowed_bytes) for _ in range(length)]) |
||||
|
|
||||
|
|
||||
def alpha_numeric(length): |
def alpha_numeric(length): |
||||
return random_token(length, str.isalnum) |
return random_token(length, str.isalnum) |
||||
|
|
||||
|
|
||||
def lower_case(length): |
def lower_case(length): |
||||
return random_token(length, str.islower) |
return random_token(length, str.islower) |
@ -1,23 +0,0 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from .. import random_tokens |
|
||||
try: |
|
||||
from jwcrypto import jwk |
|
||||
except ImportError: |
|
||||
pass |
|
||||
|
|
||||
def init_keys(IrConfigParameter): |
|
||||
keys = { |
|
||||
'galicea_openid_connect.authorization_code_jwk': lambda: \ |
|
||||
jwk.JWK.generate(kty='oct', size=256, kid=random_tokens.alpha_numeric(16), use='sig', alg='HS256').export(), |
|
||||
'galicea_openid_connect.id_token_jwk': lambda: \ |
|
||||
jwk.JWK.generate(kty='RSA', size=2054, kid=random_tokens.alpha_numeric(16), use='sig', alg='RS256').export() |
|
||||
} |
|
||||
|
|
||||
for key, gen in keys.iteritems(): |
|
||||
if not IrConfigParameter.search([('key', '=', key)]): |
|
||||
IrConfigParameter.create({ |
|
||||
'key': key, |
|
||||
'value': gen(), |
|
||||
'group_ids': [(4, IrConfigParameter.env.ref('base.group_erp_manager').id)] |
|
||||
}) |
|
@ -1,8 +0,0 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
|
||||
<odoo> |
|
||||
<data noupdate="1"> |
|
||||
<function model="ir.config_parameter" |
|
||||
name="openid_init_keys" |
|
||||
/> |
|
||||
</data> |
|
||||
</odoo> |
|
@ -1,4 +0,0 @@ |
|||||
- |
|
||||
!python {model: ir.config_parameter}: | |
|
||||
from odoo.addons.galicea_openid_connect.security import init_keys |
|
||||
init_keys(self) |
|
@ -1,24 +1,24 @@ |
|||||
# -*- coding: utf-8 -*- |
|
||||
|
|
||||
from odoo.addons.galicea_environment_checkup import \ |
|
||||
custom_check, CheckWarning, CheckSuccess, CheckFail |
|
||||
|
from odoo.addons.galicea_environment_checkup import ( |
||||
|
custom_check, |
||||
|
CheckWarning, |
||||
|
CheckSuccess, |
||||
|
CheckFail, |
||||
|
) |
||||
|
|
||||
from odoo import http |
from odoo import http |
||||
|
|
||||
|
|
||||
@custom_check |
@custom_check |
||||
def check_single_db(env): |
def check_single_db(env): |
||||
if not http.request: |
if not http.request: |
||||
raise CheckWarning('Could not detect DB settings.') |
|
||||
|
raise CheckWarning("Could not detect DB settings.") |
||||
|
|
||||
dbs = http.db_list(True, http.request.httprequest) |
dbs = http.db_list(True, http.request.httprequest) |
||||
if len(dbs) == 1: |
if len(dbs) == 1: |
||||
return CheckSuccess('Odoo runs in a single-DB mode.') |
|
||||
|
return CheckSuccess("Odoo runs in a single-DB mode.") |
||||
|
|
||||
details = ( |
details = ( |
||||
'<p>Odoo runs in a multi-DB mode, which will cause API request routing to fail.</p>' |
|
||||
'<p>Run Odoo with <tt>--dbfilter</tt> or <tt>--database</tt> flag.</p>' |
|
||||
) |
|
||||
return CheckFail( |
|
||||
'Odoo runs in a multi-DB mode.', |
|
||||
details=details |
|
||||
|
"<p>Odoo runs in a multi-DB mode, which will cause API request routing to fail.</p>" |
||||
|
"<p>Run Odoo with <tt>--dbfilter</tt> or <tt>--database</tt> flag.</p>" |
||||
) |
) |
||||
|
return CheckFail("Odoo runs in a multi-DB mode.", details=details) |
@ -1,20 +1,13 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||
{ |
{ |
||||
'name': "galicea toolset", |
|
||||
|
|
||||
'summary': """ |
|
||||
|
"name": "galicea toolset", |
||||
|
"summary": """ |
||||
A couple of small convenience widgets and functions""", |
A couple of small convenience widgets and functions""", |
||||
|
|
||||
'author': "Maciej Wawro", |
|
||||
'maintainer': "Galicea", |
|
||||
'website': "http://www.galicea.pl", |
|
||||
|
|
||||
'category': 'Technical Settings', |
|
||||
'version': '12.0.0.1', |
|
||||
|
|
||||
'depends': ['base'], |
|
||||
|
|
||||
'data': [ |
|
||||
'views/data.xml' |
|
||||
], |
|
||||
|
"author": "Maciej Wawro", |
||||
|
"maintainer": "Galicea", |
||||
|
"website": "http://www.galicea.pl", |
||||
|
"category": "Technical Settings", |
||||
|
"version": "13.0.0.1", |
||||
|
"depends": ["base"], |
||||
|
"data": ["views/data.xml"], |
||||
} |
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue