Esempio n. 1
0
def deferred_bank_widget(node, kw):
    """
    Renvoie le widget pour la sélection d'une banque
    """
    options = [(bank.id, bank.label) for bank in BankAccount.query()]
    widget = forms.get_select(options)
    return widget
Esempio n. 2
0
def bank(dbsession):
    from autonomie.models.payments import BankAccount
    bank = BankAccount(label=u"banque", code_journal='bq', compte_cg='123')
    dbsession.add(bank)
    dbsession.flush()
    return bank
Esempio n. 3
0
def deferred_bank_validator(node, kw):
    return colander.OneOf([bank.id for bank in BankAccount.query()])