[fix] UnpickleError, removed _ method from the argument of the function

This commit is contained in:
Rohit Waghchaure 2017-03-23 14:55:52 +05:30
parent f494626ce4
commit 57f35a25a1

View File

@ -44,8 +44,8 @@ def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verb
raise FiscalYearError, error_msg
return fy
def validate_fiscal_year(date, fiscal_year, label=_("Date"), doc=None):
years = [f[0] for f in get_fiscal_years(date, label=label)]
def validate_fiscal_year(date, fiscal_year, label="Date", doc=None):
years = [f[0] for f in get_fiscal_years(date, label=_(label))]
if fiscal_year not in years:
if doc:
doc.fiscal_year = years[0]