Not able to save Sales Invoice

Created a quotation and is submitted and in Ordered state
Sales order created and saved but not submitted

No delivery Note created but the Skip delivery note button is checked in sales order

No able to save Saled Invoice…pls check the attachment for error.

Check the error attachment

Try submitting again with Control-F12 pressed. And reproduce the complete error in the Console tab. That may give the people here more clues about what the error is about.

Thanks

Jay

part1 : console log

Download the Vue Devtools extension for a better development experience:

libs.min.js?ver=1578576192.0:9254 You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at Production Deployment — Vue.js
api/method/frappe.desk.form.save.savedocs:1 Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1042, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

part 2: console log

Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1042, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

libs.min.js?ver=1578576192.0:12151 WebSocket is already in CLOSING or CLOSED state.
(anonymous) @ libs.min.js?ver=1578576192.0:12151
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)

api/method/frappe.core.page.background_jobs.background_jobs.get_scheduler_status:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.desk.reportview.get:1 Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
api/method/frappe.core.doctype.user.user.test_password_strength:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
request.js:273 Unable to handle failed response
request.js:274 SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Object.frappe.request.report_error (request.js:408)
at 500 (request.js:187)
at Object. (request.js:267)
at i (jquery.min.js:2)
at Object.fireWith [as rejectWith] (jquery.min.js:2)
at z (jquery.min.js:4)
at XMLHttpRequest. (jquery.min.js:4)
(anonymous) @ desk.min.js?ver=1578576192.0:1
api/method/frappe.desk.form.save.savedocs:1 Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

request.js:355 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 60, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 61, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1042, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 272, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 295, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 929, in run_post_save_methods
self.run_method(‘on_change’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 787, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1043, in runner
add_to_return_value(self, f(self, method, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 101, in process_energy_points
frappe.get_doc(‘Energy Point Rule’, d.get(‘name’)).apply(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 22, in apply
if self.rule_condition_satisfied(doc):
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 75, in rule_condition_satisfied
return self.eval_condition(doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/social/doctype/energy_point_rule/energy_point_rule.py”, line 80, in eval_condition
‘doc’: doc.as_dict()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1538, in safe_eval
return eval(code, eval_globals, eval_locals)
File “”, line 1, in
NameError: name ‘ordered’ is not defined

Any luck on the above issue?

The issue was resolved by changes in the Energy point rules

Check if you have any energy point for sales Invoice, sales order and confirm they are correct

1 Like