예제 #1
0
 def query(self):
     return AccountingOperationUpload.query().options(
         load_only(
             AccountingOperationUpload.id,
             AccountingOperationUpload.created_at,
             AccountingOperationUpload.date,
             AccountingOperationUpload.filename,
         ))
def migrate_datas():
    from autonomie_base.models.base import DBSESSION
    session = DBSESSION()
    from autonomie.models.accounting.operations import AccountingOperationUpload
    for entry in AccountingOperationUpload.query():
        entry.filetype = "analytical_balance"
        session.merge(entry)
        session.flush()
def migrate_datas():
    from autonomie_base.models.base import DBSESSION
    session = DBSESSION()
    from autonomie.models.accounting.operations import AccountingOperationUpload
    for entry in AccountingOperationUpload.query():
        entry.filetype = "analytical_balance"
        session.merge(entry)
        session.flush()
예제 #4
0
 def query(self):
     return AccountingOperationUpload.query().options(
         load_only(
             AccountingOperationUpload.id,
             AccountingOperationUpload.created_at,
             AccountingOperationUpload.date,
             AccountingOperationUpload.filename,
             AccountingOperationUpload.filetype,
         )
     )
예제 #5
0
def analytical_upload(dbsession):
    from autonomie.models.accounting.operations import (
        AccountingOperationUpload
    )
    item = AccountingOperationUpload(
        md5sum="oooo",
        filetype="analytical_balance",
        date=datetime.date.today(),
    )
    dbsession.add(item)
    return item