12345678910111213141516171819202122232425 |
- # -*- coding: utf-8 -*-
- from openerp.http import request as r
- def get_account_move_line_partial_reconcile():
- query = '''
- SELECT
- journal.id,
- line.reconcile_partial_id,
- line.credit
- FROM account_journal AS journal
- LEFT JOIN account_move_line AS line
- ON line.journal_id = journal.id
- WHERE journal.type in ('bank','cash')
- AND line.reconcile_partial_id IS NOT NULL
- '''
- r.cr.execute(query)
- return [
- {
- 'journal_id': j[0],
- 'reconcile_partial_id': j[1],
- 'amount': j[2],
- } for j in r.cr.fetchall()
- ]
|