Aptronics / aptronics

Other
0 stars 1 forks source link

Submitting delivery note gave error #27

Closed hpema closed 4 years ago

hpema commented 4 years ago

image

hpema commented 4 years ago
Traceback (most recent call last):
  File "/home/hemant/frappe-bench/apps/frappe/frappe/app.py", line 60, in application
    response = frappe.api.handle()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/handler.py", line 61, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/__init__.py", line 1038, in call
    return fn(*args, **newargs)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 19, in savedocs
    doc.submit()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 859, in submit
    self._submit()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 848, in _submit
    self.save()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 272, in save
    return self._save(*args, **kwargs)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 325, in _save
    self.run_post_save_methods()
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 922, in run_post_save_methods
    self.run_method("on_submit")
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 787, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 1058, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 1041, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/hemant/frappe-bench/apps/frappe/frappe/model/document.py", line 781, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/hemant/frappe-bench/apps/erpnext/erpnext/stock/doctype/delivery_note/delivery_note.py", line 204, in on_submit
    self.update_prevdoc_status()
  File "/home/hemant/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py", line 110, in update_prevdoc_status
    self.update_qty()
  File "/home/hemant/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py", line 238, in update_qty
    self._update_children(args, update_modified)
  File "/home/hemant/frappe-bench/apps/erpnext/erpnext/controllers/status_updater.py", line 276, in _update_children
    where name='%(detail_id)s'""" % args)
  File "/home/hemant/frappe-bench/apps/frappe/frappe/database/database.py", line 171, in sql
    self._cursor.execute(query)
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 517, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 732, in _read_query_result
    result.read()
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 1075, in read
    first_packet = self.connection._read_packet()
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/connections.py", line 684, in _read_packet
    packet.check_error()
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/hemant/frappe-bench/env/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.InternalError: (1054, "Unknown column 'tabDelivery Note Item.target_warehouse' in 'where clause'")
SaiFi0102 commented 4 years ago

I can check and fix it. If you can push all pending changes into the repository, so that we don't have conflicts. I can see that the Target Warehouse Custom Field is missing from the JSON file.

SaiFi0102 commented 4 years ago

Solved with https://github.com/Aptronics/erpnext/pull/2

hpema commented 4 years ago

Confirmed that delivery note can now be posted without error..thnx