Skip to content

Commit

Permalink
Fix crash in sale_down_payment
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis-via committed Mar 22, 2021
1 parent 97fe8b4 commit 9b89661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sale_down_payment/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def default_get(self, fields_list):
def _compute_payment_amount(self, invoices=None, currency=None):
amount = super(AccountAbstractPayment, self)._compute_payment_amount(
invoices=invoices, currency=currency)
if self.sale_id:
if hasattr(self, 'sale_id') and self.sale_id:
payment_currency = currency
if not payment_currency:
payment_currency = self.sale_id.currency_id
Expand Down

0 comments on commit 9b89661

Please # to comment.