diff --git a/sale_down_payment/models/account_payment.py b/sale_down_payment/models/account_payment.py index a10af15a..c7893899 100644 --- a/sale_down_payment/models/account_payment.py +++ b/sale_down_payment/models/account_payment.py @@ -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