def validate_conversion_rate(currency, conversion_rate, conversion_rate_label, company):
 company_currency = frappe.db.get_value(u'Company', company, u'default_currency', cache=True)
 if (not conversion_rate):
  throw(_(u'{0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.').format(conversion_rate_label, currency, company_currency))

def validate_conversion_rate ( currency , conversion_rate , conversion_rate_label , company ) : company_currency = frappe . db . get_value ( u'Company' , company , u'default_currency' , cache = True ) if ( not conversion_rate ) : throw ( _ ( u'{0} is mandatory. Maybe Currency Exchange record is not created for {1} to {2}.' ) . format ( conversion_rate_label , currency , company_currency ) )
common validation for currency and price list currency .