Community mailing list archives
Re: Get Invoice of an account voucherby
CAYLEY CONSULTING, Omar OUHARI
Is realy what I looking to do. But how ?? I can't get the invoice in button_proforma_voucher function.
any help please.
Tel : + 220.127.116.11.20.23
2015-11-29 22:42 GMT+00:00 OpenERP Master <firstname.lastname@example.org>:
It would be easier for you to create a field on the account.voucher for the invoice id which is stored when the voucher is created..On Sun, Nov 29, 2015 at 4:27 PM, Omar Ouhari <email@example.com> wrote:Q1 = SELECT a.move_id, a.reconciliation_id FROM account_move_line a, account_voucher b WHERE b.move_id=a.move_id AND reconciliation_id IS NOT NULLQ2 = SELECT move_id,reconciliation_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 )Result = SELECT id FROM account_invoice WHERE move_id in (Q2) and move_id not in (Q1)Omar OUHARIConsultant ITTel : + 18.104.22.168.20.232015-11-29 22:14 GMT+00:00 Omar Ouhari <firstname.lastname@example.org>:Hello,thanks for your quicly replay.I did this sql query:Query1 = SELECT a.reconciliation_id FROM account_move_line a, account_voucher b WHERE b.move_id=a.move_id AND reconciliation_id IS NOT NULLlQuery2 = SELECT move_id FROM account_move_line WHERE move_id IN (Query1 )Query3 = SELECT id as invoice_id FROM account_invoice WHERE move_id in (Query2)But I couldn't find no invoice_id.Omar OUHARIConsultant ITTel : + 22.214.171.124.20.232015-11-29 20:47 GMT+00:00 Steinfeld, Maik (Intero Technologies) <M.Steinfeld@intero-technologies.de>:Account.voucher is generated from payment. Move line for payment is linked in account.voucher line. This move line should habe reconcile_ID or partial_reconcile_id. In system there is another move line with same reconcile_ID. This is the move which is linked in invoice.Intero Technologies GmbH
Heinrich Heine Ring 76
18435 StralsundHello,I have a list of an account voucher (ids) and I want to get for every couhcer the invoice which generate it.I couldn't find the invoice id in the account voucher object.Is there any idea to get the invoice id from account voucher object ?Thanks.