def __init__(self, *args, **kwargs): super(Entry, self).__init__(*args, **kwargs) if not self.pk and not self.entry_no: self.entry_no = get_next_voucher_no(Entry, self.company_id, attr='entry_no')
def __init__(self, *args, **kwargs): super(Expense, self).__init__(*args, **kwargs) if not self.pk and not self.voucher_no: self.voucher_no = get_next_voucher_no(Expense, self.company_id)
def __init__(self, *args, **kwargs): super(PurchaseOrder, self).__init__(*args, **kwargs) if not self.pk and not self.voucher_no: self.voucher_no = get_next_voucher_no(PurchaseOrder, self.company_id)
def __init__(self, *args, **kwargs): super(BankCashDeposit, self).__init__(*args, **kwargs) if not self.pk and not self.voucher_no: self.voucher_no = get_next_voucher_no(BankCashDeposit, self.company_id)
def __init__(self, *args, **kwargs): super(CashPayment, self).__init__(*args, **kwargs) if not self.pk and not self.voucher_no: self.voucher_no = get_next_voucher_no(CashPayment, self.company_id)