Fix crash in sale_down_payment
This commit is contained in:
@@ -49,7 +49,7 @@ class AccountAbstractPayment(models.AbstractModel):
|
|||||||
def _compute_payment_amount(self, invoices=None, currency=None):
|
def _compute_payment_amount(self, invoices=None, currency=None):
|
||||||
amount = super(AccountAbstractPayment, self)._compute_payment_amount(
|
amount = super(AccountAbstractPayment, self)._compute_payment_amount(
|
||||||
invoices=invoices, currency=currency)
|
invoices=invoices, currency=currency)
|
||||||
if self.sale_id:
|
if hasattr(self, 'sale_id') and self.sale_id:
|
||||||
payment_currency = currency
|
payment_currency = currency
|
||||||
if not payment_currency:
|
if not payment_currency:
|
||||||
payment_currency = self.sale_id.currency_id
|
payment_currency = self.sale_id.currency_id
|
||||||
|
|||||||
Reference in New Issue
Block a user