fix: allow operators, make weighting_function mandatory
This commit is contained in:
parent
9aeabce3d3
commit
f51661b225
@ -252,7 +252,7 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
@ -507,4 +507,5 @@ erpnext.patches.v10_0.set_discount_amount
|
|||||||
erpnext.patches.v10_0.recalculate_gross_margin_for_project
|
erpnext.patches.v10_0.recalculate_gross_margin_for_project
|
||||||
erpnext.patches.v10_0.delete_hub_documents
|
erpnext.patches.v10_0.delete_hub_documents
|
||||||
erpnext.patches.v10_0.update_user_image_in_employee
|
erpnext.patches.v10_0.update_user_image_in_employee
|
||||||
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
|
||||||
|
erpnext.patches.v10_0.allow_operators_in_supplier_scorecard
|
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright (c) 2019, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
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('>','>'))
|
||||||
|
|
||||||
|
for criteria in frappe.get_all('Supplier Scorecard Scoring Criteria', fields=['name', 'formula'], limit_page_length=None):
|
||||||
|
if criteria.formula: # not mandatory
|
||||||
|
frappe.db.set_value('Supplier Scorecard Scoring Criteria', criteria.name,
|
||||||
|
'formula', criteria.formula.replace('<','<').replace('>','>'))
|
||||||
|
|
||||||
|
for sc in frappe.get_all('Supplier Scorecard', fields=['name', 'weighting_function'], limit_page_length=None):
|
||||||
|
frappe.db.set_value('Supplier Scorecard', sc.name, 'weighting_function',
|
||||||
|
sc.weighting_function.replace('<','<').replace('>','>'))
|
Loading…
x
Reference in New Issue
Block a user