Sales order cannot be closed anymore

Dear friends,
my Sales order cannot be closed anymore,
please advice
the error message below
thanks,
ibrahim

Installed Apps

ERPNext: v10.x.x-develop (40fe3a2) (develop)

Frappe Framework: v10.x.x-develop (dd2c33e) (develop)

Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 808, in update_status
so.update_status(status)
AttributeError: ‘Document’ object has no attribute ‘update_status’

Hi

I think Sales Order don’t have update_status fields.

You have 2 way,

#1 update again database

bench migrate

#2 add update_status field by Customize Form

Hello Ibrahim Please edit your post and mention your frappe and erpnext versions.

1 Like

Installed Apps

ERPNext: v10.x.x-develop (40fe3a2) (develop)

Frappe Framework: v10.x.x-develop (dd2c33e) (develop)

another error appeared

Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 834, in submit
self._submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 823, in _submit
self.save()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 310, in _save
self.run_post_save_methods()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 893, in run_post_save_methods
self.run_method(“on_submit”)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 758, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1027, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1010, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 752, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 124, in on_submit
self.update_prevdoc_status()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 110, in update_prevdoc_status
self.update_qty()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 230, in update_qty
self._update_percent_field_in_targets(args, update_modified)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 275, in _update_percent_field_in_targets
self._update_percent_field(args, update_modified)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 302, in _update_percent_field
target.set_status(update=True)
AttributeError: ‘Document’ object has no attribute ‘set_status’

Traceback (most recent call last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/init.py”, line 939, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 834, in submit
self._submit()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 823, in _submit
self.save()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 310, in _save
self.run_post_save_methods()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 893, in run_post_save_methods
self.run_method(“on_submit”)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 758, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1027, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 1010, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/model/document.py”, line 752, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/accounts/doctype/sales_invoice/sales_invoice.py”, line 124, in on_submit
self.update_prevdoc_status()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 110, in update_prevdoc_status
self.update_qty()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 230, in update_qty
self._update_percent_field_in_targets(args, update_modified)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 275, in _update_percent_field_in_targets
self._update_percent_field(args, update_modified)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py”, line 302, in _update_percent_field
target.set_status(update=True)
AttributeError: ‘Document’ object has no attribute ‘set_status’

Is there a reason why you are working on this branch ?

Normally production servers run on the master branch.

Its AWS installation

Sir anyway to fix it?

Switch to V10 master for both Frappe and ERPNext. Don’t think much help can be done on V10 develop as Master has been in production for more than a year and it runs smoothly.

hmm what about the current database??? this installation is on the AWS
I am afraid to miss with the DB

Take a backup as precaution. The db still remains same however all the updates of master are patched. Hope you have not added any customisation. Good luck.

2 Likes