Community mailing list archives

community@mail.odoo.com

Re: Get Invoice of an account voucher

by
CAYLEY CONSULTING, Omar OUHARI
- 11/29/2015 17:38:30
Hello,

There is sql query that I write bases of replay of M. 
Maik Steinfeld:

SELECT id FROM account_invoice WHERE move_id in (SELECT move_id FROM account_move_line WHERE reconciliation_id IN (SELECT a.reconciliation_id FROM account_move_line a, account_voucher b WHERE b.move_id=a.move_id AND reconciliation_id IS NOT NULL )) and move_id not in (SELECT a.move_id FROM account_move_line a, account_voucher b WHERE b.move_id=a.move_id AND reconciliation_id IS NOT NULL)

But I got nothing in result.