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.

29 lines
795 B

import logging
from odoo.api import Environment, SUPERUSER_ID
_logger = logging.getLogger(__name__)
# def pre_init_hook(cr, registry):
# env = Environment(cr, SUPERUSER_ID, {})
# _logger.info("Pre init hook")
def post_init_hook(cr, registry):
env = Environment(cr, SUPERUSER_ID, {})
env.sudo().ref("base.main_partner").write(
{
"association": True,
"ffck_network": True,
"partner_code": "CR10",
"ffck_structure_type_id": env.ref("ffck_commond.ffck_structure_type_crck"),
"ref": "CROCK",
}
)
_logger.info("\n#####\nPost init hook from CROCK addons passed...\n#####\n")
# def uninstall_hook(cr, registry):
# env = Environment(cr, SUPERUSER_ID, {})
# _logger.info("Uninstall hook")