from django.db.models.signals import post_save
from apps.system.models import User
from django.dispatch import receiver
from apps.hrm.models import Employee

@receiver(post_save, sender=User)
def createEmployee(sender, instance, created, **kwargs):
    if created:
        Employee.objects.get_or_create(user=instance)