mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add UI hooks for displaying stocktake data for a particular part
This commit is contained in:
parent
1699e5d6d1
commit
e4306f090d
@ -1754,6 +1754,13 @@ class InvenTreeUserSetting(BaseInvenTreeSetting):
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'DISPLAY_STOCKTAKE_TAB': {
|
||||
'name': _('Part Stocktake'),
|
||||
'description': _('Display part stocktake information'),
|
||||
'default': True,
|
||||
'validator': bool,
|
||||
},
|
||||
|
||||
'TABLE_STRING_MAX_LENGTH': {
|
||||
'name': _('Table String Length'),
|
||||
'description': _('Maximimum length limit for strings displayed in table views'),
|
||||
|
@ -53,6 +53,24 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% settings_value 'DISPLAY_STOCKTAKE_TAB' user=request.user as show_stocktake %}
|
||||
{% if show_stocktake %}
|
||||
<div class='panel panel-hidden' id='panel-stocktake'>
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
<h4>{% trans "Part Stocktake" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
buttons
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
{% include "part/part_stocktake.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class='panel panel-hidden' id='panel-test-templates'>
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
|
@ -44,6 +44,11 @@
|
||||
{% trans "Scheduling" as text %}
|
||||
{% include "sidebar_item.html" with label="scheduling" text=text icon="fa-calendar-alt" %}
|
||||
{% endif %}
|
||||
{% settings_value 'DISPLAY_STOCKTAKE_TAB' user=request.user as show_stocktake %}
|
||||
{% if show_stocktake %}
|
||||
{% trans "Stocktake" as text %}
|
||||
{% include "sidebar_item.html" with label="stocktake" text=text icon="fa-clipboard-check" %}
|
||||
{% endif %}
|
||||
{% if part.trackable %}
|
||||
{% trans "Test Templates" as text %}
|
||||
{% include "sidebar_item.html" with label="test-templates" text=text icon="fa-vial" %}
|
||||
|
4
InvenTree/part/templates/part/part_stocktake.html
Normal file
4
InvenTree/part/templates/part/part_stocktake.html
Normal file
@ -0,0 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
part scheduling information to appear here
|
@ -19,6 +19,7 @@
|
||||
{% include "InvenTree/settings/setting.html" with key="FORMS_CLOSE_USING_ESCAPE" icon="fa-window-close" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_SHOW_QUANTITY_IN_FORMS" icon="fa-hashtag" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="DISPLAY_SCHEDULE_TAB" icon="fa-calendar-alt" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="DISPLAY_STOCKTAKE_TAB" icon="fa-clipboard-check" user_setting=True %}
|
||||
{% include "InvenTree/settings/setting.html" with key="TABLE_STRING_MAX_LENGTH" icon="fa-table" user_setting=True %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user