class TreeNode(MPTTModel):
account = models.OneToOneField(User, unique=True, verbose_name='Аккаунт', related_name='treenode')
def request_cash_in(self):
if self.available_for_cash_in > 0:
from payments.models import CashingInRequest
CashingInRequest.objects.create(total=self.available_for_cash_in, client=self, date=date.today())