GST Features not available

I just just now Installed a fresh copy of installation and tried a basic setup. My observation is as follows:

  1. Installed version appears to be 8.11.6
  2. GST Settings From Accounts/GST Settings gives error
  3. Doctype Address doesn’t contain GSTIN, State Code and State drop down
  4. Console error says:
    ====================
    14:12:44 web.1 | OperationalError: (1054, “Unknown column ‘gstin’ in ‘where clause’”)
    14:12:44 web.1 |
    14:12:44 web.1 | 192.168.56.1 - - [26/Sep/2017 14:12:44] “GET /?
    doctype=GST+Settings&name=GST+Settings&cmd=frappe.desk.form.load.getdoc&_=1506414249599
    HTTP/1.1” 500 -
    ====================
    Please support me to add GST Features in this new Installation.

Complete Console Log is as follows:
13:52:44 web.1 | 192.168.56.1 - - [26/Sep/2017 13:52:44] “POST / HTTP/1.1” 200 -
13:52:51 web.1 | 192.168.56.1 - - [26/Sep/2017 13:52:51] “POST / HTTP/1.1” 200 -
13:52:52 web.1 | 192.168.56.1 - - [26/Sep/2017 13:52:52] “POST / HTTP/1.1” 200 -
13:52:57 web.1 | 192.168.56.1 - - [26/Sep/2017 13:52:57] “GET /desk HTTP/1.1” 200 -
13:52:59 web.1 | 192.168.56.12 - - [26/Sep/2017 13:52:59] “GET /api/method/frappe.async.get_user_info?sid=6056b8e0ecccbc8a4519b2cf422e424a8461b706a15f760c60847c4b HTTP/1.1” 200 -
13:52:59 web.1 | 192.168.56.1 - - [26/Sep/2017 13:52:59] “POST / HTTP/1.1” 200 -
13:53:02 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:02] “POST / HTTP/1.1” 200 -
13:53:02 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:02] “POST / HTTP/1.1” 200 -
13:53:09 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:09] “POST / HTTP/1.1” 200 -
13:53:14 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:14] “GET /?doctype=GST+Settings&with_parent=1&cached_timestamp=&cmd=frappe.desk.form.load.getdoctype&_=1506414176955 HTTP/1.1” 200 -
13:53:14 web.1 | Traceback (most recent call last):
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/desk/form/load.py”, line 33, in getdoc
13:53:14 web.1 | run_onload(doc)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/desk/form/load.py”, line 201, in run_onload
13:53:14 web.1 | doc.run_method(“onload”)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 677, in run_method
13:53:14 web.1 | out = Document.hook(fn)(self, *args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 899, in composer
13:53:14 web.1 | return composed(self, method, *args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 882, in runner
13:53:14 web.1 | add_to_return_value(self, fn(self, *args, **kwargs))
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 671, in
13:53:14 web.1 | fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/erpnext/erpnext/regional/doctype/gst_settings/gst_settings.py”, line 18, in onload
13:53:14 web.1 | from tabAddress where country = “India” and ifnull(gstin, ‘’)!=‘’ ‘’‘)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/database.py”, line 165, in sql
13:53:14 web.1 | self._cursor.execute(query)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 250, in execute
13:53:14 web.1 | self.errorhandler(self, exc, value)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 50, in defaulterrorhandler
13:53:14 web.1 | raise errorvalue
13:53:14 web.1 | OperationalError: (1054, “Unknown column ‘gstin’ in ‘where clause’”)
13:53:14 web.1 |
13:53:14 web.1 | Traceback (most recent call last):
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/app.py”, line 57, in application
13:53:14 web.1 | response = frappe.handler.handle()
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/handler.py”, line 22, in handle
13:53:14 web.1 | data = execute_cmd(cmd)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
13:53:14 web.1 | return frappe.call(method, **frappe.form_dict)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/init.py”, line 923, in call
13:53:14 web.1 | return fn(*args, **newargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/desk/form/load.py”, line 33, in getdoc
13:53:14 web.1 | run_onload(doc)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/desk/form/load.py”, line 201, in run_onload
13:53:14 web.1 | doc.run_method(“onload”)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 677, in run_method
13:53:14 web.1 | out = Document.hook(fn)(self, *args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 899, in composer
13:53:14 web.1 | return composed(self, method, *args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 882, in runner
13:53:14 web.1 | add_to_return_value(self, fn(self, *args, **kwargs))
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/model/document.py”, line 671, in
13:53:14 web.1 | fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/erpnext/erpnext/regional/doctype/gst_settings/gst_settings.py”, line 18, in onload
13:53:14 web.1 | from tabAddress where country = “India” and ifnull(gstin, ‘’)!=’’ ‘’')
13:53:14 web.1 | File “/home/frappe/mmtech-bench/apps/frappe/frappe/database.py”, line 165, in sql
13:53:14 web.1 | self.cursor.execute(query)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 250, in execute
13:53:14 web.1 | self.errorhandler(self, exc, value)
13:53:14 web.1 | File “/home/frappe/mmtech-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 50, in defaulterrorhandler
13:53:14 web.1 | raise errorvalue
13:53:14 web.1 | OperationalError: (1054, “Unknown column ‘gstin’ in ‘where clause’”)
13:53:14 web.1 |
13:53:14 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:14] "GET /?doctype=GST+Settings&name=GST+Settings&cmd=frappe.desk.form.load.getdoc&
=1506414176956 HTTP/1.1" 500 -
13:53:29 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:29] “POST / HTTP/1.1” 200 -
13:53:59 web.1 | 192.168.56.1 - - [26/Sep/2017 13:53:59] “POST / HTTP/1.1” 200 -
13:54:07 web.1 | 192.168.56.1 - - [26/Sep/2017 13:54:07] “POST / HTTP/1.1” 200 -
13:54:10 web.1 | 192.168.56.1 - - [26/Sep/2017 13:54:10] “GET /desk HTTP/1.1” 200 -

Is this a fresh setup or did you restore a backup? If you restored a backup, try bench --site sitename migrate.
If not, try bench --site sitename reinstall

It is a fresh setup on a fresh Ubuntu 16.04.3 LTS. I tried installing 2 times and also used manual migration as well. I have upgraded the ERP Next and Frappe to version 9.0.0 as well using
bench update --upgrade

On detailed screening I observed that all the custom fields related to GST are not available on fresh install via
_**bench get-app erpnext https://github.com/frappe/erpnext.git**_

When I manually added the 3 custom fields using Customized Form “Address”

  1. gstin as data,
  2. gst_state as select with options
  3. gst_state_number as int readonly

GST Setting has started working. It seems that GST related fields in other documents like Sales Invoice are also missing. I feel that some of the patch has not worked to create these custom fields.

I trust that there is no issue with Ubuntu 16.04.3 LTS.