Odoo modules about association management
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.
 

40 lines
897 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["res.country"].search(
[
(
"code",
"in",
(
"FR",
"GP",
"MQ",
"GF",
"RE",
"YT",
),
)
]
).write(
{
"is_french": True,
}
)
_logger.info("\n#####\nPost init hook for french associations passed...\n#####\n")
# def uninstall_hook(cr, registry):
# env = Environment(cr, SUPERUSER_ID, {})
# _logger.info("Uninstall hook")