Browse Source

fixup! fixup! fixup! [ADD] new module module_analysis

12.0
Sylvain LE GAL 6 years ago
committed by OCA-git-bot
parent
commit
d14495828b
  1. 3
      module_analysis/README.rst
  2. 18
      module_analysis/__init__.py
  3. 1
      module_analysis/__manifest__.py
  4. 4
      module_analysis/readme/INSTALL.rst

3
module_analysis/README.rst

@ -56,9 +56,8 @@ Installation
To use this module, you have to install the application ``cloc``
.. code-block:: shell
``sudo apt-get install cloc``
sudo apt-get install cloc
Configuration
=============

18
module_analysis/__init__.py

@ -1 +1,19 @@
from . import models
# Copyright 2016-2018 Akretion France
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, SUPERUSER_ID
def post_init_hook(cr, registry):
"""This post_install script is required because, when the module
is installed, Odoo creates the column in the DB and compute the field
and THEN it loads the file data/res_country_department_data.yml...
So, when it computes the field on module installation, the
departments are not available in the DB, so the department_id field
on res.partner stays null. This post_install script fixes this."""
print("=====================")
print("=====================")
print("=====================")

1
module_analysis/__manifest__.py

@ -29,5 +29,6 @@
'external_dependencies': {
'lib': ['cloc'],
},
'post_init_hook': 'post_init_hook',
'installable': True,
}

4
module_analysis/readme/INSTALL.rst

@ -1,5 +1,3 @@
To use this module, you have to install the application ``cloc``
.. code-block:: shell
sudo apt-get install cloc
``sudo apt-get install cloc``
Loading…
Cancel
Save