Skip to content

Commit

Permalink
fix: validate python expressions (frappe#26835) (frappe#26856)
Browse files Browse the repository at this point in the history
(cherry picked from commit 07337d5)

Co-authored-by: Ankush <ankush@iwebnotes.com>
  • Loading branch information
frappe-pr-bot and ankush committed Aug 9, 2021
1 parent e7a77d9 commit ea83e2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions erpnext/accounts/doctype/pricing_rule/pricing_rule.json
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,8 @@
"description": "Simple Python Expression, Example: territory != 'All Territories'",
"fieldname": "condition",
"fieldtype": "Code",
"label": "Condition"
"label": "Condition",
"options": "PythonExpression"
},
{
"fieldname": "column_break_42",
Expand All @@ -575,7 +576,7 @@
"icon": "fa fa-gift",
"idx": 1,
"links": [],
"modified": "2021-03-06 22:01:24.840422",
"modified": "2021-08-06 15:10:04.219321",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"description": "Simple Python formula applied on Reading fields.<br> Numeric eg. 1: <b>reading_1 &gt; 0.2 and reading_1 &lt; 0.5</b><br>\nNumeric eg. 2: <b>mean &gt; 3.5</b> (mean of populated fields)<br>\nValue based eg.: <b>reading_value in (\"A\", \"B\", \"C\")</b>",
"fieldname": "acceptance_formula",
"fieldtype": "Code",
"label": "Acceptance Criteria Formula"
"label": "Acceptance Criteria Formula",
"options": "PythonExpression"
},
{
"default": "0",
Expand Down Expand Up @@ -89,7 +90,7 @@
"idx": 1,
"istable": 1,
"links": [],
"modified": "2021-02-04 18:50:02.056173",
"modified": "2021-08-06 15:08:20.911338",
"modified_by": "Administrator",
"module": "Stock",
"name": "Item Quality Inspection Parameter",
Expand Down

0 comments on commit ea83e2b

Please sign in to comment.