Browse Source

[MIG] base_manifest_extension: Migrate to v9

* Migrate to v9 branch
* Update manifest and README
* Change license to LGPL
pull/979/head
Oleg Bulkin 7 years ago
parent
commit
28f76dd258
  1. 56
      base_manifest_extension/README.rst
  2. 5
      base_manifest_extension/__init__.py
  3. 23
      base_manifest_extension/__openerp__.py
  4. 5
      base_manifest_extension/hooks.py
  5. 5
      base_manifest_extension/tests/__init__.py
  6. 5
      base_manifest_extension/tests/test_base_manifest_extension.py

56
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
<https://github.com/OCA/server-tools/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 <https://github.com/OCA/server-tools/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 <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
* Odoo Community Association:
`Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Holger Brunn <hbrunn@therp.nl>
* Oleg Bulkin <obulkin@laslabs.com>
Do not contact contributors directly about help with questions or problems concerning this addon, but use the `community mailing list <mailto:community@mail.odoo.com>`_ or the `appropriate specialized mailinglist <https://odoo-community.org/groups>`_ 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
----------

5
base_manifest_extension/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2017 Therp BV <http://therp.nl>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
from .hooks import post_load_hook

23
base_manifest_extension/__openerp__.py

@ -1,15 +1,14 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2017 Therp BV <http://therp.nl>
# 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',
}

5
base_manifest_extension/hooks.py

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2017 Therp BV <http://therp.nl>
# 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

5
base_manifest_extension/tests/__init__.py

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2017 Therp BV <http://therp.nl>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
from . import test_base_manifest_extension

5
base_manifest_extension/tests/test_base_manifest_extension.py

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# Copyright 2017 Therp BV <http://therp.nl>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
import os
import tempfile
from openerp.tests.common import TransactionCase

Loading…
Cancel
Save