Friend,

   I don't know, but I think that this problem can be a bug, because
run OK in SQLite but generate this errors in GAE.
   In my case, I'm using the crud.create() to generate the input FORM
then I do not know why the orderby is being called.

   In db.py I have this field in the table "contas_receber"
    Field('conta_corrente_id', db.conta_corrente,
requires=IS_IN_DB(db(db.conta_corrente.tipo=='Cred'),
'conta_corrente.id', 'conta_corrente.descricao'), label=T('Conta
Corrente')),
    This field exists in this table because I need associate with a
"conta_corrente" table record where the tipo is 'Cred'

    I have a idea but I don' know how to do:

    1) Filter my controller fucntion to show me only records where
conta_corrente.tipo is 'Cred', for example:
    def contas_receber_create():
        form=crud.create(db.contas_receber, next=URL(r =request,f =
'contas_receber_lista'), message=T("Registro Inserido com Sucesso !"))
 
form.conta_corrente_options=db(db.conta_corrente.tipo=='Cred').select(db.conta_corrente.ALL)
       return dict(form=form)


Reply via email to