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

6 months ago
  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.sudo().ref("base.main_partner").write(
  10. {
  11. "association": True,
  12. "ffck_network": True,
  13. "partner_code": "CR10",
  14. "ffck_structure_type_id": env.ref("ffck_commond.ffck_structure_type_crck"),
  15. "ref": "CROCK",
  16. }
  17. )
  18. _logger.info("\n#####\nPost init hook from CROCK addons passed...\n#####\n")
  19. # def uninstall_hook(cr, registry):
  20. # env = Environment(cr, SUPERUSER_ID, {})
  21. # _logger.info("Uninstall hook")