diff --git a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py index 15ba3f93bac..737ddd6ddd5 100644 --- a/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py +++ b/erpnext/buying/doctype/supplier_scorecard_period/supplier_scorecard_period.py @@ -61,8 +61,8 @@ class SupplierScorecardPeriod(Document): return weighed_score - def get_eval_statement(self, input): - my_eval_statement = input.replace("\r", "").replace("\n", "") + def get_eval_statement(self, formula): + my_eval_statement = formula.replace("\r", "").replace("\n", "") for var in self.variables: if var.value: diff --git a/erpnext/patches/v10_0/allow_operators_in_supplier_scorecard.py b/erpnext/patches/v10_0/allow_operators_in_supplier_scorecard.py index 27478f3ad5d..827f9bc94fa 100644 --- a/erpnext/patches/v10_0/allow_operators_in_supplier_scorecard.py +++ b/erpnext/patches/v10_0/allow_operators_in_supplier_scorecard.py @@ -5,6 +5,10 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doc('buying', 'doctype', 'supplier_scorecard_criteria') + frappe.reload_doc('buying', 'doctype', 'supplier_scorecard_scoring_criteria') + frappe.reload_doc('buying', 'doctype', 'supplier_scorecard') + for criteria in frappe.get_all('Supplier Scorecard Criteria', fields=['name', 'formula'], limit_page_length=None): frappe.db.set_value('Supplier Scorecard Criteria', criteria.name, 'formula', criteria.formula.replace('<','<').replace('>','>'))