Use account_receivable_used property to obtain the party's account.

This commit is contained in:
Albert Cervera i Areny 2019-12-27 19:40:46 +01:00
parent c2d1841686
commit 5174a64ad6
1 changed files with 2 additions and 2 deletions

View File

@ -239,8 +239,8 @@ class WizardSalePayment(Wizard):
if not sale.number:
Sale.set_number([sale])
account = (sale.party.account_receivable
and sale.party.account_receivable.id)
with Transaction().set_context(date=Date.today()):
account = sale.party.account_receivable_used
if not account:
raise UserError(gettext(