You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
781 B
19 lines
781 B
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("=====================")
|