Get currency id only if currency is filled

issue10594
review359851002
This commit is contained in:
Cédric Krier committed 2021-08-06 09:26:18 +02:00
1 parent d6ab4a673c
commit 5f468f554f
1 file changed
+1 -1
+1 -1
View File
@@ -1447,7 +1447,7 @@ class SaleLine(TaxableMixin, sequence_ordered(), ModelSQL, ModelView):
@fields.depends('sale', '_parent_sale.currency')
def on_change_with_currency(self, name=None):
if self.sale:
if self.sale and self.sale.currency:
return self.sale.currency.id
@classmethod