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
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
def deferred_bank_validator(node, kw): return colander.OneOf([bank.id for bank in BankAccount.query()])