Error on quotation save

Whenever we save a quotation, and error is thrown. Following is the trace.

Traceback (most recent call last):
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 230, in save
    return self._save(*args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 263, in _save
    self.run_before_save_methods()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 777, in run_before_save_methods
    self.run_method("validate")
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 671, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 665, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 26, in validate
    super(Quotation, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/selling_controller.py", line 35, in validate
    super(SellingController, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 17, in validate
    super(StockController, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 37, in validate
    self.calculate_taxes_and_totals()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 88, in calculate_taxes_and_totals
    calculate_taxes_and_totals(self)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 15, in __init__
    self.calculate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 19, in calculate
    self._calculate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 38, in _calculate
    self.calculate_totals()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 303, in calculate_totals
    self._set_in_company_currency(self.doc, ["total_taxes_and_charges", "rounding_adjustment"])
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 81, in _set_in_company_currency
    val = flt(flt(doc.get(f), doc.precision(f)) * self.doc.conversion_rate, doc.precision("base_" + f))
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/base_document.py", line 692, in precision
    if df.fieldtype in ("Currency", "Float", "Percent"):
AttributeError: 'NoneType' object has no attribute 'fieldtype'

Traceback (most recent call last):
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/app.py", line 57, in application
    response = frappe.handler.handle()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/__init__.py", line 923, in call
    return fn(*args, **newargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
    doc.save()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 230, in save
    return self._save(*args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 263, in _save
    self.run_before_save_methods()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 777, in run_before_save_methods
    self.run_method("validate")
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 671, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 892, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 875, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/document.py", line 665, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 26, in validate
    super(Quotation, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/selling_controller.py", line 35, in validate
    super(SellingController, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/stock_controller.py", line 17, in validate
    super(StockController, self).validate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 37, in validate
    self.calculate_taxes_and_totals()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/accounts_controller.py", line 88, in calculate_taxes_and_totals
    calculate_taxes_and_totals(self)
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 15, in __init__
    self.calculate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 19, in calculate
    self._calculate()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 38, in _calculate
    self.calculate_totals()
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 303, in calculate_totals
    self._set_in_company_currency(self.doc, ["total_taxes_and_charges", "rounding_adjustment"])
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/erpnext/erpnext/controllers/taxes_and_totals.py", line 81, in _set_in_company_currency
    val = flt(flt(doc.get(f), doc.precision(f)) * self.doc.conversion_rate, doc.precision("base_" + f))
  File "/home/ntexadmin/projects/withrun/withrun-bench/apps/frappe/frappe/model/base_document.py", line 692, in precision
    if df.fieldtype in ("Currency", "Float", "Percent"):
AttributeError: 'NoneType' object has no attribute 'fieldtype'

Error basically starts from here as rounding_adjustment field is sent, while it is not present. self._set_in_company_currency(self.doc, [“total_taxes_and_charges”, “rounding_adjustment”])

changing this to
self._set_in_company_currency(self.doc, [“total_taxes_and_charges”])
temporarily solves the error.

Versions:
erpnext 8.11.4
frappe 8.10.8
bench 4.1.0

Last commit:
commit 6960a76adc30277d598bf693b7e0f81b6dd918aa
Author: Nabin Hait nabinhait@gmail.com
Date: Tue Sep 19 17:22:30 2017 +0530

Fixes related to schools fees

Can you add this to github issues?

@Himanshu_Mishra Pushed a potential fix, please update again.

HI, I am getting this same error while saving a new quotation. i recently installed the version in my server and have started to enter the fields one by one. while started entering the quotation i am getting this error. could someone help me to fix this issue.

Please copy and paste the complete traceback here, found on the server in the logs/ directory

HI, sorry to ask you. but can you tell me the steps to get the logs… i am new here… and i opened localhost application and in that i opened the settings and checked the error logs and couldnt find any error. or is there some other method to get the logs…

Your particular server install notes will have these directions please check there…

hi, i found out that the problem is something related to tax section. when i enable the tax as 5%, this error is occurring. whereas if i am not adding the tax amount for my quotation, i am not getting this error. it saves as draft and then i can submit it… please guide me how to fix this issue.

To access your traceback in your logs, this should help

Close this thread here and continue this parallel one here