Fix: Manufacturing Purchase Order page view, filter, and save.
This commit is contained in:
140
app.log.1
140
app.log.1
@@ -1,9 +1,10 @@
|
||||
Request: 127.0.0.1 GET http /store/stock_items? Host: 127.0.0.1:5000
|
||||
Server Error: 'order' is undefined
|
||||
Request: 127.0.0.1 GET http /store/manufacturing_purchase_orders?active=true&date_from=&date_to= Host: 127.0.0.1:5000
|
||||
|
||||
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
|
||||
|
||||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8
|
||||
|
||||
|
||||
Accept-Language: en-GB,en;q=0.5
|
||||
|
||||
Accept-Encoding: gzip, deflate, br, zstd
|
||||
@@ -18,86 +19,75 @@ Priority: u=0, i
|
||||
|
||||
Upgrade-Insecure-Requests: 1
|
||||
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Sec-Fetch-Dest: document
|
||||
|
||||
Sec-Fetch-Mode: navigate
|
||||
|
||||
Sec-Fetch-Site: same-origin
|
||||
|
||||
res = self._query(mogrified_query)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\cursors.py", line 330, in _query
|
||||
db.query(q)
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\MySQLdb\connections.py", line 261, in query
|
||||
_mysql.connection.query(self, query)
|
||||
MySQLdb.OperationalError: (1054, "Unknown column 'SL.id_storage_location' in 'field list'")
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\stock_item.py", line 40, in stock_items
|
||||
model = Model_View_Store_Stock_Item(form_filters)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Sec-Fetch-User: ?1
|
||||
|
||||
Sec-Gpc: 1
|
||||
|
||||
Priority: u=0, i
|
||||
|
||||
|
||||
|
||||
|
||||
Request data: b''
|
||||
Traceback: Traceback (most recent call last):
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 880, in full_dispatch_request
|
||||
rv = self.dispatch_request()
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 865, in dispatch_request
|
||||
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\controllers\store\manufacturing_purchase_order.py", line 43, in manufacturing_purchase_orders
|
||||
return render_template('pages/store/_manufacturing_purchase_orders.html', model = model, datetime = datetime)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 150, in render_template
|
||||
return _render(app, template, context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\templating.py", line 131, in _render
|
||||
rv = template.render(context)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 1304, in render
|
||||
self.environment.handle_exception()
|
||||
self.storage_locations = self.get_many_storage_location(False)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\models\model_view_store.py", line 499, in get_many_storage_location
|
||||
storage_locations = DataStore_Store_Base().get_many_storage_location(get_inactive)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_store_base.py", line 236, in get_many_storage_location
|
||||
result = self.db_procedure_execute(_m_db_storage_location, argument_dict_list_storage_location)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\datastores\datastore_base.py", line 95, in db_procedure_execute
|
||||
result = db.session.execute(proc_string, argument_dict_list)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\scoping.py", line 778, in execute
|
||||
return self._proxied.execute(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
|
||||
return self._execute_internal(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\orm\session.py", line 2245, in _execute_internal
|
||||
result = conn.execute(
|
||||
^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1418, in execute
|
||||
return meth(
|
||||
^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\sql\elements.py", line 515, in _execute_on_connection
|
||||
return connection._execute_clauseelement(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1640, in _execute_clauseelement
|
||||
ret = self._execute_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1846, in _execute_context
|
||||
return self._exec_single_context(
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1986, in _exec_single_context
|
||||
self._handle_dbapi_exception(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 939, in handle_exception
|
||||
raise rewrite_traceback_stack(source=source)
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_manufacturing_purchase_orders.html", line 1, in top-level template code
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\base.py", line 1967, in _exec_single_context
|
||||
self.dialect.do_execute(
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\sqlalchemy\engine\default.py", line 924, in do_execute
|
||||
{% extends 'layouts/layout.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\layouts\layout.html", line 354, in top-level template code
|
||||
{% block page_body %}{% endblock %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\pages\store\_manufacturing_purchase_orders.html", line 62, in block 'page_body'
|
||||
{% include 'components/store/_row_manufacturing_purchase_order.html' %}
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\OneDrive\Documents\Programming\Visual Studio 2022\PARTS_Web\app\templates\components\store\_row_manufacturing_purchase_order.html", line 40, in top-level template code
|
||||
<tr class="{{ model.FLAG_MANUFACTURING_PURCHASE_ORDER }}" {{ model.ATTR_ID_MANUFACTURING_PURCHASE_ORDER }}="{{ order.id_order }}">
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\edwar\AppData\Local\Programs\Python\Python312\Lib\site-packages\jinja2\environment.py", line 487, in getattr
|
||||
return getattr(obj, attribute)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
jinja2.exceptions.UndefinedError: 'order' is undefined
|
||||
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: development
|
||||
config_env: production
|
||||
config_env: production
|
||||
Server Error: (MySQLdb.OperationalError) (1054, "Unknown column 'v_id_permission_manufacturing' in 'where clause'")
|
||||
[SQL: CALL p_shop_get_many_manufacturing_purchase_order(%s, %s, %s, %s, %s, %s, %s, %s)]
|
||||
[parameters: (0, True, True, '', '', None, None, 0)]
|
||||
(Background on this error at: https://sqlalche.me/e/20/e3q8)
|
||||
|
||||
Reference in New Issue
Block a user