Esempio n. 1
0
 def wm_import(self, wm_staff):
   address = Address()
   address.wm_import(wm_staff.address)
   address.save()
   self.address = address
   self.wm_id = wm_staff.id
   self.username = wm_staff.name
   self.phone = wm_staff.phone
   self.mobile = wm_staff.mobile
   self.email = wm_staff.email
   self.payrollcode = wm_staff.payrollcode
   self.save()
Esempio n. 2
0
 def save(self, *args, **kwargs):
   if not self.address:
     address = Address()
     address.save()
     self.address = address
   super(Staff, self).save(*args, **kwargs)