From 28f76dd25895555259a7047090c3cfdcdb021a31 Mon Sep 17 00:00:00 2001 From: Oleg Bulkin Date: Thu, 7 Sep 2017 19:59:36 -0700 Subject: [PATCH] [MIG] base_manifest_extension: Migrate to v9 * Migrate to v9 branch * Update manifest and README * Change license to LGPL --- base_manifest_extension/README.rst | 56 +++++++++++-------- base_manifest_extension/__init__.py | 5 +- base_manifest_extension/__openerp__.py | 23 ++++---- base_manifest_extension/hooks.py | 5 +- base_manifest_extension/tests/__init__.py | 5 +- .../tests/test_base_manifest_extension.py | 5 +- 6 files changed, 57 insertions(+), 42 deletions(-) diff --git a/base_manifest_extension/README.rst b/base_manifest_extension/README.rst index 0bda0b233..652284ae6 100644 --- a/base_manifest_extension/README.rst +++ b/base_manifest_extension/README.rst @@ -1,38 +1,47 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 +.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl.html + :alt: License: LGPL-3 -========================= -Extra options in manifest -========================= +=============================== +Module Manifest - Extra Options +=============================== -This is a technical module to allow developers to make use of a couple of new keys in module manifests. +This is a technical module that allows developers to make use of extra keys in +module manifests. The following keys are available currently: -The following new keys are available currently: - -depends_if_installed - Your module will depend on modules listed here, but only if those modules are already installed. This is useful if your module is supposed to override behavior of a third module if present, but it's not a hard dependency of your module. Think of auth_* and their interactions. +* ``depends_if_installed`` - Your module will depend on modules listed here but + only if those modules are already installed. This is useful if your module is + supposed to override the behavior of a certain module (dependencies determine + load order) but does not need it to be installed. Usage ===== -* depend on this module and use the keys described above +Add this module as a dependency and use the keys described above. Roadmap ======= -* ``breaks`` to mark some modules as being incompatible. This also could be versioned (``'breaks': ['my_module<<0.4.2']``) -* ``demo_if_installed``, ``data_if_installed``, ``qweb_if_installed`` being dicts with module names as keys and a list of files as values in order to pull some data files in case some other module is installed -* ``rdepends_if_installed`` to make another installed module depend on the current module -* ``_if_module`` on models to load certain models only if the appropriate module is installed +Add support for the following additional keys: + +* ``breaks`` - Used to mark some modules as being incompatible with the + current one. This could be set up to support versioning (e.g. ``'breaks': + ['my_module<<0.4.2']``). +* ``demo_if_installed``, ``data_if_installed``, ``qweb_if_installed`` - Dicts + with module names as keys and lists of files as values. Used to load files + only if some other module is installed. +* ``rdepends_if_installed`` - Similar to ``depends_if_installed`` but + used to make another installed module depend on the current one. +* ``_if_module`` - Used on models to load them only if the appropriate module + is installed. Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on +`GitHub Issues `_. In case of +trouble, please check there if your issue has already been reported. If you +spotted it first, help us smash it by providing detailed and welcome feedback. Credits ======= @@ -40,14 +49,17 @@ Credits Images ------ -* Odoo Community Association: `Icon `_. +* Odoo Community Association: + `Icon `_. Contributors ------------ * Holger Brunn +* Oleg Bulkin -Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list `_ or the `appropriate specialized mailinglist `_ for help, and the bug tracker linked in `Bug Tracker`_ above for technical issues. +Do not contact contributors directly about support or help with technical +issues. Maintainer ---------- diff --git a/base_manifest_extension/__init__.py b/base_manifest_extension/__init__.py index 85185497d..87ad052e9 100644 --- a/base_manifest_extension/__init__.py +++ b/base_manifest_extension/__init__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- -# © 2017 Therp BV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Therp BV +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) + from .hooks import post_load_hook diff --git a/base_manifest_extension/__openerp__.py b/base_manifest_extension/__openerp__.py index 8f89a484f..40963db91 100644 --- a/base_manifest_extension/__openerp__.py +++ b/base_manifest_extension/__openerp__.py @@ -1,15 +1,14 @@ # -*- coding: utf-8 -*- -# © 2017 Therp BV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Therp BV +# Copyright 2017 LasLabs Inc. +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) + { - "name": "More options in manifest", - "version": "8.0.1.0.0", - "author": "Therp BV,Odoo Community Association (OCA)", - "license": "AGPL-3", - "category": "Hidden/Dependency", - "summary": "Adds some useful keys to manifest files", - "depends": [ - 'base', - ], - "post_load": 'post_load_hook', + 'name': 'Module Manifest - Extra Options', + 'version': '9.0.1.0.0', + 'author': 'Therp BV, LasLabs, Odoo Community Association (OCA)', + 'license': 'LGPL-3', + 'category': 'Hidden/Dependency', + 'summary': 'Adds useful keys to manifest files', + 'post_load': 'post_load_hook', } diff --git a/base_manifest_extension/hooks.py b/base_manifest_extension/hooks.py index fd6f857e7..688965140 100644 --- a/base_manifest_extension/hooks.py +++ b/base_manifest_extension/hooks.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# © 2017 Therp BV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Therp BV +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) + import inspect from openerp.sql_db import Cursor from openerp.modules import module diff --git a/base_manifest_extension/tests/__init__.py b/base_manifest_extension/tests/__init__.py index 535989849..9ee84a5af 100644 --- a/base_manifest_extension/tests/__init__.py +++ b/base_manifest_extension/tests/__init__.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- -# © 2017 Therp BV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Therp BV +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) + from . import test_base_manifest_extension diff --git a/base_manifest_extension/tests/test_base_manifest_extension.py b/base_manifest_extension/tests/test_base_manifest_extension.py index 959839b90..dc7434680 100644 --- a/base_manifest_extension/tests/test_base_manifest_extension.py +++ b/base_manifest_extension/tests/test_base_manifest_extension.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- -# © 2017 Therp BV -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# Copyright 2017 Therp BV +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) + import os import tempfile from openerp.tests.common import TransactionCase