[FIX] account_voucher: avoid error if no partner
authorMartin Trigaux <mat@openerp.com>
Mon, 18 Aug 2014 15:50:32 +0000 (17:50 +0200)
committerMartin Trigaux <mat@openerp.com>
Mon, 18 Aug 2014 15:50:32 +0000 (17:50 +0200)
commit85b08a75f616ff412a36a96ac5ae3c52e06898f1
tree355885715d652eb74663b6cfd846e76b1812a1cb
parent397e83554b09357a227b4d4b4758739a4778748f
[FIX] account_voucher: avoid error if no partner

The field partner_id is not required on an account.voucher but the validation was failing if none was set (opw 611663).
This patch makes a fallback on the account of the voucher if neither a partner nor a writeoff account is specified.
addons/account_voucher/account_voucher.py