Exemple #1
0
 def before_save(self, xfer):
     accounts = self.item.third.accountthird_set.filter(code__regex=current_system_account().get_societary_mask())
     if len(accounts) == 0:
         if Params.getvalue("condominium-old-accounting"):
             AccountThird.objects.create(third=self.item.third, code=correct_accounting_code(Params.getvalue("condominium-default-owner-account")))
         else:
             for num_account in range(1, 5):
                 AccountThird.objects.create(third=self.item.third,
                                             code=correct_accounting_code(Params.getvalue("condominium-default-owner-account%d" % num_account)))
     return SupportingEditor.before_save(self, xfer)
Exemple #2
0
 def before_save(self, xfer):
     self.item.check_account()
     return SupportingEditor.before_save(self, xfer)