diff --git a/keychain/README.rst b/keychain/README.rst index 1af8ba2cd..b8d2ed6bc 100644 --- a/keychain/README.rst +++ b/keychain/README.rst @@ -61,7 +61,7 @@ Usage (for module dev) ====================== -* Add this keychain as a dependency in __openerp__.py +* Add this keychain as a dependency in __manifest__.py * Subclass `keychain.account` and add your module in namespaces: `(see after for the name of namespace )` .. code:: python diff --git a/keychain/__manifest__.py b/keychain/__manifest__.py new file mode 100644 index 000000000..0e99a5cb7 --- /dev/null +++ b/keychain/__manifest__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Copyright <2016> Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Keychain", + "summary": "Store accounts and credentials", + "version": "10.0.1.0.0", + "category": "Uncategorized", + "website": "https://akretion.com/", + "author": "Akretion, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "external_dependencies": { + "python": [ + 'cryptography'], + }, + "depends": [ + "base_setup", + ], + "data": [ + "security/ir.model.access.csv", + 'views/keychain_view.xml' + ], +} diff --git a/keychain/models/keychain.py b/keychain/models/keychain.py index 0008adb3c..a94ffb23c 100644 --- a/keychain/models/keychain.py +++ b/keychain/models/keychain.py @@ -6,10 +6,10 @@ from functools import wraps import logging import json -from openerp import models, fields, api -from openerp.exceptions import ValidationError -from openerp.tools.config import config -from openerp.tools.translate import _ +from odoo import models, fields, api +from odoo.exceptions import ValidationError +from odoo.tools.config import config +from odoo.tools.translate import _ _logger = logging.getLogger(__name__) @@ -40,7 +40,9 @@ class KeychainAccount(models.Model): technical_name = fields.Char( required=True, help="Technical name. Must be unique") - namespace = fields.Selection([], help="Type of account", required=True) + namespace = fields.Selection(selection=[], + help="Type of account", + required=True) environment = fields.Char( required=False, help="'prod', 'dev', etc. or empty (for all)" diff --git a/keychain/tests/test_keychain.py b/keychain/tests/test_keychain.py index ef82d6db9..b18b0a061 100644 --- a/keychain/tests/test_keychain.py +++ b/keychain/tests/test_keychain.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -from openerp.tests.common import TransactionCase -from openerp.tools.config import config -from openerp.exceptions import ValidationError +from odoo.tests.common import TransactionCase +from odoo.tools.config import config +from odoo.exceptions import ValidationError import logging @@ -21,6 +21,7 @@ class TestKeychain(TransactionCase): self.keychain = self.env['keychain.account'] config['keychain_key'] = Fernet.generate_key() + config['running_env'] = "" self.old_running_env = config['running_env'] config['running_env'] = None diff --git a/keychain/views/keychain_view.xml b/keychain/views/keychain_view.xml index 223f84899..6dc746e2a 100644 --- a/keychain/views/keychain_view.xml +++ b/keychain/views/keychain_view.xml @@ -1,6 +1,5 @@ - - + keychain.account @@ -44,7 +43,6 @@ - - +