Hello,
Anyone had luck fixing ‘status’ not defined error?
App Versions
{
"erpnext": "13.21.0",
"frappe": "13.21.0"
}
Route
Form/Purchase Order/PO-2022-00006
Trackeback
Traceback (most recent call last):
File "apps/frappe/frappe/desk/form/save.py", line 19, in savedocs
doc.submit()
File "apps/frappe/frappe/model/document.py", line 939, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 928, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 287, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 341, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1022, in run_post_save_methods
self.run_method('on_change')
File "apps/frappe/frappe/model/document.py", line 869, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1161, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1146, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 105, in process_energy_points
frappe.get_doc('Energy Point Rule', d.get('name')).apply(doc)
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 24, in apply
if self.rule_condition_satisfied(doc):
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 77, in rule_condition_satisfied
return self.eval_condition(doc)
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 81, in eval_condition
return self.condition and frappe.safe_eval(self.condition, None, {
File "apps/frappe/frappe/__init__.py", line 1759, in safe_eval
return eval(code, eval_globals, eval_locals)
File "<string>", line 1, in <module>
NameError: name 'status' is not defined
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 68, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 68, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1213, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 19, in savedocs
doc.submit()
File "apps/frappe/frappe/model/document.py", line 939, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 928, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 287, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 341, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1022, in run_post_save_methods
self.run_method('on_change')
File "apps/frappe/frappe/model/document.py", line 869, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1161, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1146, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 105, in process_energy_points
frappe.get_doc('Energy Point Rule', d.get('name')).apply(doc)
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 24, in apply
if self.rule_condition_satisfied(doc):
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 77, in rule_condition_satisfied
return self.eval_condition(doc)
File "apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py", line 81, in eval_condition
return self.condition and frappe.safe_eval(self.condition, None, {
File "apps/frappe/frappe/__init__.py", line 1759, in safe_eval
return eval(code, eval_globals, eval_locals)
File "<string>", line 1, in <module>
NameError: name 'status' is not defined
Request Data
{
"type": "POST",
"args": {
"doc": "{\"name\":\"PO-2022-00006\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"idx\":0,\"docstatus\":0,\"workflow_state\":\"Pending Review\",\"title\":\"{supplier_name}\",\"naming_series\":\"PO-.YYYY.-\",\"supplier\":\"VFT INC.\",\"supplier_name\":\"VFT Inc.\",\"apply_tds\":0,\"company\":\"Florence Filter\",\"transaction_date\":\"2022-12-01\",\"schedule_date\":\"2022-12-01\",\"supplier_address\":\"Primary Address-Billing-679\",\"address_display\":\"1040 S. VAIL AVE.<br>\\n\\t\\tMONTEBELLO, CA 90640<br>\",\"contact_person\":\"VFT INC.-VFT INC.\",\"contact_display\":\"VFT INC.\",\"contact_mobile\":\"909-466-8897\",\"contact_email\":\"\",\"shipping_address\":\"Florence Filter HQ-Billing-1\",\"shipping_address_display\":\"530 W. Manville St. <br>\\n\\t\\tCompton, CA 90220<br>\",\"billing_address\":\"Florence Filter HQ-Billing-1\",\"billing_address_display\":\"530 W. Manville St. <br>\\n\\t\\tCompton, CA 90220<br>\",\"currency\":\"USD\",\"conversion_rate\":1,\"buying_price_list\":\"Pamlico 2022\",\"price_list_currency\":\"USD\",\"plc_conversion_rate\":1,\"ignore_pricing_rule\":0,\"is_subcontracted\":\"No\",\"total_qty\":340,\"base_total\":5628,\"base_net_total\":5628,\"total_net_weight\":0,\"total\":5628,\"net_total\":5628,\"tax_category\":\"\",\"taxes_and_charges\":\"Resale and Production Components - FFC\",\"base_taxes_and_charges_added\":0,\"base_taxes_and_charges_deducted\":0,\"base_total_taxes_and_charges\":0,\"taxes_and_charges_added\":0,\"taxes_and_charges_deducted\":0,\"total_taxes_and_charges\":0,\"apply_discount_on\":\"Grand Total\",\"base_discount_amount\":0,\"additional_discount_percentage\":0,\"discount_amount\":0,\"base_grand_total\":5628,\"base_rounding_adjustment\":0,\"base_in_words\":\"USD Five Thousand, Six Hundred And Twenty Eight only.\",\"base_rounded_total\":5628,\"grand_total\":5628,\"rounding_adjustment\":0,\"rounded_total\":5628,\"disable_rounded_total\":0,\"in_words\":\"USD Five Thousand, Six Hundred And Twenty Eight only.\",\"advance_paid\":0,\"payment_terms_template\":\"NET30\",\"status\":\"Draft\",\"per_billed\":0,\"per_received\":0,\"tc_name\":\"Supplier Terms of Service\",\"terms\":\"<div class=\\\"ql-editor read-mode\\\"><p>Doing business with Florence Filter subjects suppliers and manufacturers to the following Supplier Terms of Service. The terms \\\"supplier\\\", \\\"vendor\\\" and \\\"manufacture\\\" may be use interchangeably and refer to the party with which Florence Filter is doing business.</p><p><br></p><p><strong>Purchase Order Terms:</strong> Contact Florence Filter purchasing department staff for questions about individual purchase orders or if <strong>back orders</strong> cannot be met within the required date indicated on the face of the PO. Please confirm PO receipt and pricing via email to <a href=\\\"mailto:[purchasing@florencefilter.com](mailto:purchasing@florencefilter.com)\\\" rel=\\\"noopener noreferrer\\\">[purchasing@florencefilter.com](mailto:purchasing@florencefilter.com)</a>. If the indicated delivery date cannot be met, please advise of the revised delivery date on your confirmation. Payment shall be made upon receipt of all goods indicated.</p><p><br></p><p><strong>Delivery Hours: </strong>Regular delivery hours without an appointment are 8:00am to Noon, Monday through Friday Pacific Time. </p><p><br></p><p><strong>Order Authentication: </strong>Florence Filter purchase orders are not valid without the appropriate authorizing signature. Payment shall be made upon receipt of all goods indicated. </p><p><br></p><p><strong>Order Acceptance: </strong>Acceptance of a purchase order indicates acceptance of the indicated prices, quantities, and Florence Filter terms of Service. Florence Filter pays based on this purchase order, which supersedes any other terms or contract. Please verify pricing and quantity details before shipping goods. Acceptance of a Florence Filter purchase order is acceptance of our Supplier Terms of Doing Business. Acceptance of orders placed via Florence Filter Purchase Orders are subject to the terms listed on the purchase order as well as Florence Filter's Supplier Terms of Doing Business. No goods or services will be paid for without a corresponding purchase order.</p><p><br></p><p><strong>Payment Terms: </strong>Florence Filter requests a minimum of NET30 terms when approved for Supplier's line of credit. Terms which include early payment discounts will be considered during the ordering process.</p><p><br></p><p><strong>Pricing: </strong>Price changes for special quotes require 90 day notice via email to [purchasing@florencefilter.com](mailto:purchasing@florencefilter.com). An email confirmation must be received as acceptance of the price change. Multiplier changes require 30 day notice via email to [purchasing@florencefilter.com](mailto:purchasing@florencefilter.com). An email confirmation must be received as acceptance of the multiplier change.</p><p><br></p><p><strong>Freight Terms:</strong> All products are FOB Destination. Prices are freight included, delivered to 530 W. Manville St., Compton CA 90220. Unless specified otherwise on the purchase order. All orders which exceed 300 cases or a half truck, under either situation shall be FOB Destination, freight prepaid by the Supplier to any US location. Drop Shipments: Direct or drop shipments are acceptable and are considered individual shipments. Freight terms will apply to each location.</p><p><br></p><p><strong>Payment Terms:</strong> Florence Filter requests a minimum of NET30 terms when approved for supplier's line of credit. Terms which include early payment discounts will be considered during the ordering process.</p><p><br></p><p><strong>Cost changes</strong> for special quotes require 90 day notice via email to purchasing@florencefilter.com. An email confirmation must be received as acceptance of the price change.</p><p><br></p><p><strong>Costing multiplier</strong> changes require 90 day notice via email to purchasing@florencefilter.com. An email confirmation must be received as acceptance of the multiplier change.</p><p><br></p><p><strong>Order acceptance freight terms: </strong>All products are FOB Destination. Prices are freight included, delivered to 530 W. Manville St., Compton CA 90220.</p><p><br></p><p><strong>Freight: </strong>Orders which exceed 300 cases shall be FOB Destination, free freight prepaid by the supplier to any US location.</p><p><br></p><p><strong> Drop Shipments</strong> or <strong>Direct Shipments</strong> are acceptable and are considered individual shipments. Freight terms will apply to each location.</p></div>\",\"letter_head\":\"FFC1\",\"language\":\"en\",\"group_same_items\":0,\"party_account_currency\":\"USD\",\"is_internal_supplier\":0,\"doctype\":\"Purchase Order\",\"items\":[{\"name\":\"aa00c87d69\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Order\",\"idx\":1,\"docstatus\":0,\"item_code\":\"RLM838\",\"item_name\":\"30\\\"x1\\\"x90 ft Poly B\",\"schedule_date\":\"2022-12-01\",\"description\":\"30\\\"x1\\\"x90 ft Poly B\",\"image\":\"\",\"qty\":70,\"stock_uom\":\"Each\",\"uom\":\"Roll\",\"conversion_factor\":1,\"stock_qty\":70,\"price_list_rate\":0,\"last_purchase_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":19.99,\"amount\":1399.3,\"base_rate\":19.99,\"base_amount\":1399.3,\"stock_uom_rate\":19.99,\"is_free_item\":0,\"net_rate\":19.99,\"net_amount\":1399.3,\"base_net_rate\":19.99,\"base_net_amount\":1399.3,\"warehouse\":\"Finished Goods - FFC\",\"actual_qty\":0,\"company_total_stock\":0,\"delivered_by_supplier\":0,\"against_blanket_order\":0,\"blanket_order_rate\":0,\"item_group\":\"Poly B Rolls\",\"received_qty\":0,\"returned_qty\":0,\"billed_amt\":0,\"include_exploded_items\":0,\"weight_per_unit\":0,\"total_weight\":0,\"cost_center\":\"1 - Management - FFC\",\"is_fixed_asset\":0,\"item_tax_rate\":\"{}\",\"page_break\":0,\"doctype\":\"Purchase Order Item\"},{\"name\":\"c9d0b4ca91\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Order\",\"idx\":2,\"docstatus\":0,\"item_code\":\"RLM837\",\"supplier_part_no\":\"LHD07528\",\"item_name\":\"28\\\"x1\\\"x90 ft Poly B\",\"schedule_date\":\"2022-12-01\",\"description\":\"28\\\"x1\\\"x90 ft Poly B\",\"image\":\"\",\"qty\":70,\"stock_uom\":\"Each\",\"uom\":\"Roll\",\"conversion_factor\":1,\"stock_qty\":70,\"price_list_rate\":0,\"last_purchase_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":18.57,\"amount\":1299.9,\"base_rate\":18.57,\"base_amount\":1299.9,\"stock_uom_rate\":18.57,\"is_free_item\":0,\"net_rate\":18.57,\"net_amount\":1299.9,\"base_net_rate\":18.57,\"base_net_amount\":1299.9,\"warehouse\":\"Finished Goods - FFC\",\"actual_qty\":0,\"company_total_stock\":0,\"delivered_by_supplier\":0,\"against_blanket_order\":0,\"blanket_order_rate\":0,\"item_group\":\"Poly B Rolls\",\"received_qty\":0,\"returned_qty\":0,\"billed_amt\":0,\"include_exploded_items\":0,\"weight_per_unit\":0,\"total_weight\":0,\"cost_center\":\"1 - Management - FFC\",\"is_fixed_asset\":0,\"item_tax_rate\":\"{}\",\"page_break\":0,\"doctype\":\"Purchase Order Item\"},{\"name\":\"f5456eef29\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Order\",\"idx\":3,\"docstatus\":0,\"item_code\":\"RLM833\",\"supplier_part_no\":\"LHD07520\",\"item_name\":\"20\\\"x1\\\"x90 ft Poly B\",\"schedule_date\":\"2022-12-01\",\"description\":\"20\\\"x1\\\"x90 ft Poly B\",\"image\":\"\",\"qty\":70,\"stock_uom\":\"Each\",\"uom\":\"Each\",\"conversion_factor\":1,\"stock_qty\":70,\"price_list_rate\":0,\"last_purchase_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":13.39,\"amount\":937.3,\"base_rate\":13.39,\"base_amount\":937.3,\"stock_uom_rate\":13.39,\"is_free_item\":0,\"net_rate\":13.39,\"net_amount\":937.3,\"base_net_rate\":13.39,\"base_net_amount\":937.3,\"warehouse\":\"Finished Goods - FFC\",\"actual_qty\":0,\"company_total_stock\":0,\"delivered_by_supplier\":0,\"against_blanket_order\":0,\"blanket_order_rate\":0,\"item_group\":\"Poly B Rolls\",\"received_qty\":0,\"returned_qty\":0,\"billed_amt\":0,\"include_exploded_items\":0,\"weight_per_unit\":0,\"total_weight\":0,\"cost_center\":\"1 - Management - FFC\",\"is_fixed_asset\":0,\"item_tax_rate\":\"{}\",\"page_break\":0,\"doctype\":\"Purchase Order Item\"},{\"name\":\"9fc593c8d0\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Order\",\"idx\":4,\"docstatus\":0,\"item_code\":\"RLM835\",\"supplier_part_no\":\"LHD07524\",\"item_name\":\"24\\\"x1\\\"x90 ft Poly B\",\"schedule_date\":\"2022-12-01\",\"description\":\"24\\\"x1\\\"x90 ft Poly B\",\"image\":\"\",\"qty\":60,\"stock_uom\":\"Each\",\"uom\":\"Each\",\"conversion_factor\":1,\"stock_qty\":60,\"price_list_rate\":0,\"last_purchase_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":16.03,\"amount\":961.8,\"base_rate\":16.03,\"base_amount\":961.8,\"stock_uom_rate\":16.03,\"is_free_item\":0,\"net_rate\":16.03,\"net_amount\":961.8,\"base_net_rate\":16.03,\"base_net_amount\":961.8,\"warehouse\":\"Finished Goods - FFC\",\"actual_qty\":0,\"company_total_stock\":0,\"delivered_by_supplier\":0,\"against_blanket_order\":0,\"blanket_order_rate\":0,\"item_group\":\"Poly B Rolls\",\"received_qty\":0,\"returned_qty\":0,\"billed_amt\":0,\"include_exploded_items\":0,\"weight_per_unit\":0,\"total_weight\":0,\"cost_center\":\"1 - Management - FFC\",\"is_fixed_asset\":0,\"item_tax_rate\":\"{}\",\"page_break\":0,\"doctype\":\"Purchase Order Item\"},{\"name\":\"afb674034e\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"items\",\"parenttype\":\"Purchase Order\",\"idx\":5,\"docstatus\":0,\"item_code\":\"RLM834\",\"supplier_part_no\":\"LHD07522\",\"item_name\":\"22\\\"x1\\\"x90 ft Poly B\",\"schedule_date\":\"2022-12-01\",\"description\":\"22\\\"x1\\\"x90 ft Poly B\",\"image\":\"\",\"qty\":70,\"stock_uom\":\"Each\",\"uom\":\"Each\",\"conversion_factor\":1,\"stock_qty\":70,\"price_list_rate\":0,\"last_purchase_rate\":0,\"base_price_list_rate\":0,\"margin_type\":\"\",\"margin_rate_or_amount\":0,\"rate_with_margin\":0,\"discount_percentage\":0,\"discount_amount\":0,\"base_rate_with_margin\":0,\"rate\":14.71,\"amount\":1029.7,\"base_rate\":14.71,\"base_amount\":1029.7,\"stock_uom_rate\":14.71,\"is_free_item\":0,\"net_rate\":14.71,\"net_amount\":1029.7,\"base_net_rate\":14.71,\"base_net_amount\":1029.7,\"warehouse\":\"Finished Goods - FFC\",\"actual_qty\":0,\"company_total_stock\":0,\"delivered_by_supplier\":0,\"against_blanket_order\":0,\"blanket_order_rate\":0,\"item_group\":\"Poly B Rolls\",\"received_qty\":0,\"returned_qty\":0,\"billed_amt\":0,\"include_exploded_items\":0,\"weight_per_unit\":0,\"total_weight\":0,\"cost_center\":\"1 - Management - FFC\",\"is_fixed_asset\":0,\"item_tax_rate\":\"{}\",\"page_break\":0,\"doctype\":\"Purchase Order Item\"}],\"pricing_rules\":[],\"supplied_items\":[],\"taxes\":[],\"payment_schedule\":[{\"name\":\"da8c12ba76\",\"owner\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"creation\":\"2022-12-01 12:55:40.137023\",\"modified\":\"2023-01-06 15:25:52.575790\",\"modified_by\":\"[brian.denomme@florencefilter.com](mailto:brian.denomme@florencefilter.com)\",\"parent\":\"PO-2022-00006\",\"parentfield\":\"payment_schedule\",\"parenttype\":\"Purchase Order\",\"idx\":1,\"docstatus\":0,\"payment_term\":\"NET30\",\"description\":\"NET 30 Day Terms\",\"due_date\":\"2022-12-31\",\"invoice_portion\":100,\"discount_type\":\"Percentage\",\"discount_date\":\"2022-12-01\",\"discount\":0,\"payment_amount\":5628,\"outstanding\":5628,\"paid_amount\":0,\"discounted_amount\":0,\"base_payment_amount\":5628,\"doctype\":\"Payment Schedule\"}],\"__onload\":{\"supplier_tds\":null},\"__last_sync_on\":\"2023-01-07T00:40:26.557Z\"}",
"action": "Submit"
},
"btn": {
"jQuery224081158758737628261": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 1026,
"namespace": ""
}
]
}
}
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs"
}
Response Data
{
"exception": "NameError: name 'status' is not defined"
}