voidwarranties / MALMan

Members Accounting Library Management
7 stars 2 forks source link

in accounting dates should be converted to python date before being sent to the database (to add SQLite support) #35

Closed warddr closed 10 years ago

warddr commented 10 years ago

I have been testing sqlite, and it works quite good, untill I got an error when adding an accounting transaction:

StatementError: SQLite Date type only accepts Python date objects as input. (original cause: TypeError: SQLite Date type only accepts Python date objects as input.) u'INSERT INTO accounting_transactions (date, advance_date, facturation_date, is_revenue, amount, to_from, category_id, description, bank_id, bank_statement_number, date_filed, filed_by_id, reimbursement_comments) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' [{'facturation_date': u'2014-08-01', 'to_from': u'ward', 'date_filed': datetime.date(2014, 8, 3), 'advance_date': None, 'bank_id': u'1', 'amount': u'.23', 'is_revenue': u'1', 'bank_statement_number': u'', 'reimbursement_comments': None, 'date': u'2014-08-01', 'filed_by_id': 1, 'category_id': u'8', 'description': u'lidgeld'}]