ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

While saving sales order iam facing this issue?


#1

Traceback (most recent call last):
File “/opt/bench/erpnext/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 282, in _save
self.insert()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 221, in insert
self.run_before_save_methods()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 885, in run_before_save_methods
self.run_method(“validate”)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 780, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1041, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 774, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bench/erpnext/apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 34, in validate
super(SalesOrder, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/selling_controller.py”, line 39, in validate
super(SellingController, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/stock_controller.py”, line 21, in validate
super(StockController, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 71, in validate
self.calculate_taxes_and_totals()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 156, in calculate_taxes_and_totals
calculate_taxes_and_totals(self)
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 15, in init
self.calculate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 19, in calculate
self._calculate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 39, in _calculate
self.calculate_totals()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 340, in calculate_totals
self.set_rounded_total()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 351, in set_rounded_total
if self.doc.is_rounded_total_disabled():
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 815, in is_rounded_total_disabled
return frappe.db.get_single_value(“Global Defaults”, “disable_rounded_total”)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 543, in get_single_value
if df.fieldtype in frappe.model.numeric_fieldtypes:
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’

Traceback (most recent call last):
File “/opt/bench/erpnext/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/opt/bench/erpnext/apps/frappe/frappe/handler.py”, line 20, in handle
data = execute_cmd(cmd)
File “/opt/bench/erpnext/apps/frappe/frappe/handler.py”, line 55, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/opt/bench/erpnext/apps/frappe/frappe/init.py”, line 1013, in call
return fn(*args, **newargs)
File “/opt/bench/erpnext/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 259, in save
return self._save(*args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 282, in _save
self.insert()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 221, in insert
self.run_before_save_methods()
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 885, in run_before_save_methods
self.run_method(“validate”)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 780, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1058, in composer
return composed(self, method, *args, **kwargs)
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 1041, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/opt/bench/erpnext/apps/frappe/frappe/model/document.py”, line 774, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/opt/bench/erpnext/apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py”, line 34, in validate
super(SalesOrder, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/selling_controller.py”, line 39, in validate
super(SellingController, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/stock_controller.py”, line 21, in validate
super(StockController, self).validate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 71, in validate
self.calculate_taxes_and_totals()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 156, in calculate_taxes_and_totals
calculate_taxes_and_totals(self)
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 15, in init
self.calculate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 19, in calculate
self._calculate()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 39, in _calculate
self.calculate_totals()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 340, in calculate_totals
self.set_rounded_total()
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/taxes_and_totals.py”, line 351, in set_rounded_total
if self.doc.is_rounded_total_disabled():
File “/opt/bench/erpnext/apps/erpnext/erpnext/controllers/accounts_controller.py”, line 815, in is_rounded_total_disabled
return frappe.db.get_single_value(“Global Defaults”, “disable_rounded_total”)
File “/opt/bench/erpnext/apps/frappe/frappe/database/database.py”, line 543, in get_single_value
if df.fieldtype in frappe.model.numeric_fieldtypes:
AttributeError: ‘NoneType’ object has no attribute ‘fieldtype’


#2

A similar problem is fixed here

this… (not sure of exact syntax) might recreate the necessary pieces

bench reload-doctype “Sales Order”