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

  1. import logging
  2. from odoo.api import Environment, SUPERUSER_ID
  3. _logger = logging.getLogger(__name__)
  4. # def pre_init_hook(cr, registry):
  5. # env = Environment(cr, SUPERUSER_ID, {})
  6. # _logger.info("Pre init hook")
  7. def post_init_hook(cr, registry):
  8. env = Environment(cr, SUPERUSER_ID, {})
  9. env["res.country"].search(
  10. [
  11. (
  12. "code",
  13. "in",
  14. (
  15. "FR",
  16. "GP",
  17. "MQ",
  18. "GF",
  19. "RE",
  20. "YT",
  21. ),
  22. )
  23. ]
  24. ).write(
  25. {
  26. "is_french": True,
  27. }
  28. )
  29. _logger.info("\n#####\nPost init hook for french associations passed...\n#####\n")
  30. # def uninstall_hook(cr, registry):
  31. # env = Environment(cr, SUPERUSER_ID, {})
  32. # _logger.info("Uninstall hook")