mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 07:05:41 +00:00 
			
		
		
		
	Merge pull request #1999 from matmair/turn-of-functions
Disable functions in navbars
This commit is contained in:
		@@ -783,6 +783,44 @@ class InvenTreeSetting(BaseInvenTreeSetting):
 | 
				
			|||||||
            'description': _('Prefix value for purchase order reference'),
 | 
					            'description': _('Prefix value for purchase order reference'),
 | 
				
			||||||
            'default': 'PO',
 | 
					            'default': 'PO',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # enable/diable ui elements
 | 
				
			||||||
 | 
					        'BUILD_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable build'),
 | 
				
			||||||
 | 
					            'description': _('Enable build functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        'BUY_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable buy'),
 | 
				
			||||||
 | 
					            'description': _('Enable buy functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        'SELL_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable sell'),
 | 
				
			||||||
 | 
					            'description': _('Enable sell functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        'STOCK_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable stock'),
 | 
				
			||||||
 | 
					            'description': _('Enable stock functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        'SO_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable SO'),
 | 
				
			||||||
 | 
					            'description': _('Enable SO functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        'PO_FUNCTION_ENABLE': {
 | 
				
			||||||
 | 
					            'name': _('Enable PO'),
 | 
				
			||||||
 | 
					            'description': _('Enable PO functionality in InvenTree interface'),
 | 
				
			||||||
 | 
					            'default': True,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    class Meta:
 | 
					    class Meta:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,6 +2,10 @@
 | 
				
			|||||||
{% load static %}
 | 
					{% load static %}
 | 
				
			||||||
{% load inventree_extras %}
 | 
					{% load inventree_extras %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
 | 
				
			||||||
 | 
					{% settings_value 'SO_FUNCTION_ENABLE' as enable_so %}
 | 
				
			||||||
 | 
					{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
<ul class='list-group'>
 | 
					<ul class='list-group'>
 | 
				
			||||||
    <li class='list-group-item'>
 | 
					    <li class='list-group-item'>
 | 
				
			||||||
        <a href='#' id='company-menu-toggle'>
 | 
					        <a href='#' id='company-menu-toggle'>
 | 
				
			||||||
@@ -28,6 +32,7 @@
 | 
				
			|||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% if company.is_manufacturer or company.is_supplier %}
 | 
					    {% if company.is_manufacturer or company.is_supplier %}
 | 
				
			||||||
 | 
					    {% if enable_stock %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Stock Items" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Stock Items" %}'>
 | 
				
			||||||
        <a href='#' id='select-company-stock' class='nav-toggle'>
 | 
					        <a href='#' id='select-company-stock' class='nav-toggle'>
 | 
				
			||||||
            <span class='fas fa-boxes sidebar-icon'></span>
 | 
					            <span class='fas fa-boxes sidebar-icon'></span>
 | 
				
			||||||
@@ -35,8 +40,9 @@
 | 
				
			|||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% if company.is_supplier %}
 | 
					    {% if company.is_supplier and enable_po %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Purchase Orders" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Purchase Orders" %}'>
 | 
				
			||||||
        <a href='#' id='select-purchase-orders' class='nav-toggle'>
 | 
					        <a href='#' id='select-purchase-orders' class='nav-toggle'>
 | 
				
			||||||
            <span class='fas fa-shopping-cart sidebar-icon'></span>
 | 
					            <span class='fas fa-shopping-cart sidebar-icon'></span>
 | 
				
			||||||
@@ -45,7 +51,7 @@
 | 
				
			|||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    {% if company.is_customer %}
 | 
					    {% if company.is_customer and enable_so %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Sales Orders" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Sales Orders" %}'>
 | 
				
			||||||
        <a href='#' id='select-sales-orders' class='nav-toggle'>
 | 
					        <a href='#' id='select-sales-orders' class='nav-toggle'>
 | 
				
			||||||
            <span class='fas fa-truck sidebar-icon'></span>
 | 
					            <span class='fas fa-truck sidebar-icon'></span>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,6 +4,12 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
 | 
					{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
 | 
				
			||||||
{% settings_value 'PART_SHOW_RELATED' as show_related %}
 | 
					{% settings_value 'PART_SHOW_RELATED' as show_related %}
 | 
				
			||||||
 | 
					{% settings_value 'BUILD_FUNCTION_ENABLE' as enable_build %}
 | 
				
			||||||
 | 
					{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
 | 
				
			||||||
 | 
					{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
 | 
				
			||||||
 | 
					{% settings_value 'SO_FUNCTION_ENABLE' as enable_so %}
 | 
				
			||||||
 | 
					{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %}
 | 
				
			||||||
 | 
					{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<ul class='list-group'>
 | 
					<ul class='list-group'>
 | 
				
			||||||
    <li class='list-group-item'>
 | 
					    <li class='list-group-item'>
 | 
				
			||||||
@@ -25,12 +31,14 @@
 | 
				
			|||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% if enable_stock %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Stock Items" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Stock Items" %}'>
 | 
				
			||||||
        <a href='#' id='select-part-stock' class='nav-toggle'>
 | 
					        <a href='#' id='select-part-stock' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-boxes sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-boxes sidebar-icon'></span>
 | 
				
			||||||
            {% trans "Stock" %}
 | 
					            {% trans "Stock" %}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
 | 
					    {% endif %}
 | 
				
			||||||
    {% if part.assembly %}
 | 
					    {% if part.assembly %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Bill of Materials" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Bill of Materials" %}'>
 | 
				
			||||||
        <a href='#' id='select-bom' class='nav-toggle'>
 | 
					        <a href='#' id='select-bom' class='nav-toggle'>
 | 
				
			||||||
@@ -38,7 +46,7 @@
 | 
				
			|||||||
            {% trans "Bill of Materials" %}
 | 
					            {% trans "Bill of Materials" %}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% if roles.build.view %}
 | 
					    {% if roles.build.view and enable_build %}
 | 
				
			||||||
    <li class='list-group-item ' title='{% trans "Build Orders" %}'>
 | 
					    <li class='list-group-item ' title='{% trans "Build Orders" %}'>
 | 
				
			||||||
        <a href='#' id='select-build-orders' class='nav-toggle'>
 | 
					        <a href='#' id='select-build-orders' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-tools sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-tools sidebar-icon'></span>
 | 
				
			||||||
@@ -55,19 +63,22 @@
 | 
				
			|||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% if enable_buy or enable_sell %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Pricing Information" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Pricing Information" %}'>
 | 
				
			||||||
        <a href='#' id='select-pricing' class='nav-toggle'>
 | 
					        <a href='#' id='select-pricing' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-dollar-sign sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-dollar-sign sidebar-icon'></span>
 | 
				
			||||||
            {% trans "Prices" %}
 | 
					            {% trans "Prices" %}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% if part.purchaseable and roles.purchase_order.view %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% if part.purchaseable and roles.purchase_order.view and enable_buy %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Suppliers" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Suppliers" %}'>
 | 
				
			||||||
        <a href='#' id='select-suppliers' class='nav-toggle'>
 | 
					        <a href='#' id='select-suppliers' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-building sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-building sidebar-icon'></span>
 | 
				
			||||||
            {% trans "Suppliers" %}
 | 
					            {% trans "Suppliers" %}
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
 | 
					    {% if enable_po %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Purchase Orders" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Purchase Orders" %}'>
 | 
				
			||||||
        <a href='#' id='select-purchase-orders' class='nav-toggle'>
 | 
					        <a href='#' id='select-purchase-orders' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-shopping-cart sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-shopping-cart sidebar-icon'></span>
 | 
				
			||||||
@@ -75,7 +86,8 @@
 | 
				
			|||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% endif %}
 | 
					    {% endif %}
 | 
				
			||||||
    {% if roles.sales_order.view %}
 | 
					    {% endif %}
 | 
				
			||||||
 | 
					    {% if roles.sales_order.view and enable_sell and enable_so %}
 | 
				
			||||||
    <li class='list-group-item' title='{% trans "Sales Orders" %}'>
 | 
					    <li class='list-group-item' title='{% trans "Sales Orders" %}'>
 | 
				
			||||||
        <a href='#' id='select-sales-orders' class='nav-toggle'>
 | 
					        <a href='#' id='select-sales-orders' class='nav-toggle'>
 | 
				
			||||||
            <span class='menu-tab-icon fas fa-truck sidebar-icon'></span>
 | 
					            <span class='menu-tab-icon fas fa-truck sidebar-icon'></span>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,6 +10,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
{% block content %}
 | 
					{% block content %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %}
 | 
				
			||||||
 | 
					{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %}
 | 
				
			||||||
 | 
					{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
 | 
				
			||||||
 | 
					{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<div class="panel panel-default panel-inventree">
 | 
					<div class="panel panel-default panel-inventree">
 | 
				
			||||||
    <!-- Default panel contents -->
 | 
					    <!-- Default panel contents -->
 | 
				
			||||||
    <div class="panel-heading"><h3>{{ part.full_name }}</h3></div>
 | 
					    <div class="panel-heading"><h3>{{ part.full_name }}</h3></div>
 | 
				
			||||||
@@ -80,10 +85,12 @@
 | 
				
			|||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    {% endif %}
 | 
					                    {% endif %}
 | 
				
			||||||
                    {% if part.active %}
 | 
					                    {% if part.active %}
 | 
				
			||||||
 | 
					                    {% if enable_buy or enable_sell  %}
 | 
				
			||||||
                    <button type='button' class='btn btn-default' id='price-button' title='{% trans "Show pricing information" %}'>
 | 
					                    <button type='button' class='btn btn-default' id='price-button' title='{% trans "Show pricing information" %}'>
 | 
				
			||||||
                        <span id='part-price-icon' class='fas fa-dollar-sign'/>
 | 
					                        <span id='part-price-icon' class='fas fa-dollar-sign'/>
 | 
				
			||||||
                    </button>
 | 
					                    </button>
 | 
				
			||||||
                    {% if roles.stock.change %}
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					                    {% if roles.stock.change and enable_stock %}
 | 
				
			||||||
                    <div class='btn-group'>
 | 
					                    <div class='btn-group'>
 | 
				
			||||||
                        <button id='stock-actions' title='{% trans "Stock actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'>
 | 
					                        <button id='stock-actions' title='{% trans "Stock actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'>
 | 
				
			||||||
                            <span class='fas fa-boxes'></span> <span class='caret'></span>
 | 
					                            <span class='fas fa-boxes'></span> <span class='caret'></span>
 | 
				
			||||||
@@ -104,8 +111,8 @@
 | 
				
			|||||||
                        </ul>
 | 
					                        </ul>
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    {% endif %}
 | 
					                    {% endif %}
 | 
				
			||||||
                    {% if part.purchaseable %}
 | 
					                    {% if part.purchaseable and roles.purchase_order.add %}
 | 
				
			||||||
                    {% if roles.purchase_order.add %}
 | 
					                    {% if enable_buy and enable_po %}
 | 
				
			||||||
                    <button type='button' class='btn btn-default' id='part-order' title='{% trans "Order part" %}'>
 | 
					                    <button type='button' class='btn btn-default' id='part-order' title='{% trans "Order part" %}'>
 | 
				
			||||||
                        <span id='part-order-icon' class='fas fa-shopping-cart'/>
 | 
					                        <span id='part-order-icon' class='fas fa-shopping-cart'/>
 | 
				
			||||||
                    </button>
 | 
					                    </button>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,8 @@
 | 
				
			|||||||
<table class='table table-striped table-condensed'>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    {% include "InvenTree/settings/header.html" %}
 | 
					    {% include "InvenTree/settings/header.html" %}
 | 
				
			||||||
    <tbody>
 | 
					    <tbody>
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="BUILD_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        <tr><td colspan='5'></td></tr>
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_PREFIX" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_PREFIX" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_REGEX" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="BUILDORDER_REFERENCE_REGEX" %}
 | 
				
			||||||
    </tbody>
 | 
					    </tbody>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,6 +11,9 @@
 | 
				
			|||||||
<table class='table table-striped table-condensed'>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    {% include "InvenTree/settings/header.html" %}
 | 
					    {% include "InvenTree/settings/header.html" %}
 | 
				
			||||||
    <tbody>
 | 
					    <tbody>
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="PO_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="BUY_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        <tr><td colspan='5'></td></tr>
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_REFERENCE_PREFIX" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PURCHASEORDER_REFERENCE_PREFIX" %}
 | 
				
			||||||
    </tbody>
 | 
					    </tbody>
 | 
				
			||||||
</table>
 | 
					</table>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,9 @@
 | 
				
			|||||||
<table class='table table-striped table-condensed'>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    {% include "InvenTree/settings/header.html" %}
 | 
					    {% include "InvenTree/settings/header.html" %}
 | 
				
			||||||
    <tbody>
 | 
					    <tbody>
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="SO_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="SELL_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        <tr><td colspan='5'></td></tr>
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="SALESORDER_REFERENCE_PREFIX" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="SALESORDER_REFERENCE_PREFIX" %}
 | 
				
			||||||
    </tbody>
 | 
					    </tbody>
 | 
				
			||||||
</table>
 | 
					</table>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,6 +12,8 @@
 | 
				
			|||||||
<table class='table table-striped table-condensed'>
 | 
					<table class='table table-striped table-condensed'>
 | 
				
			||||||
    {% include "InvenTree/settings/header.html" %}
 | 
					    {% include "InvenTree/settings/header.html" %}
 | 
				
			||||||
    <tbody>
 | 
					    <tbody>
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="STOCK_FUNCTION_ENABLE" icon="fa-check" %}
 | 
				
			||||||
 | 
					        <tr><td colspan='5'></td></tr>
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="STOCK_GROUP_BY_PART" icon="fa-layer-group" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="STOCK_GROUP_BY_PART" icon="fa-layer-group" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,12 @@
 | 
				
			|||||||
{% load i18n %}
 | 
					{% load i18n %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{% settings_value 'BARCODE_ENABLE' as barcodes %}
 | 
					{% settings_value 'BARCODE_ENABLE' as barcodes %}
 | 
				
			||||||
 | 
					{% settings_value 'BUILD_FUNCTION_ENABLE' as enable_build %}
 | 
				
			||||||
 | 
					{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %}
 | 
				
			||||||
 | 
					{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %}
 | 
				
			||||||
 | 
					{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
 | 
				
			||||||
 | 
					{% settings_value 'SO_FUNCTION_ENABLE' as enable_so %}
 | 
				
			||||||
 | 
					{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<nav class="navbar navbar-xs navbar-default navbar-fixed-top ">
 | 
					<nav class="navbar navbar-xs navbar-default navbar-fixed-top ">
 | 
				
			||||||
  <div class="container-fluid">
 | 
					  <div class="container-fluid">
 | 
				
			||||||
@@ -22,28 +28,32 @@
 | 
				
			|||||||
        {% if roles.part.view %}
 | 
					        {% if roles.part.view %}
 | 
				
			||||||
        <li><a href="{% url 'part-index' %}"><span class='fas fa-shapes icon-header'></span>{% trans "Parts" %}</a></li>
 | 
					        <li><a href="{% url 'part-index' %}"><span class='fas fa-shapes icon-header'></span>{% trans "Parts" %}</a></li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
        {% if roles.stock.view %}
 | 
					        {% if roles.stock.view and enable_stock %}
 | 
				
			||||||
        <li><a href="{% url 'stock-index' %}"><span class='fas fa-boxes icon-header'></span>{% trans "Stock" %}</a></li>
 | 
					        <li><a href="{% url 'stock-index' %}"><span class='fas fa-boxes icon-header'></span>{% trans "Stock" %}</a></li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
        {% if roles.build.view %}
 | 
					        {% if roles.build.view and enable_build %}
 | 
				
			||||||
        <li><a href="{% url 'build-index' %}"><span class='fas fa-tools icon-header'></span>{% trans "Build" %}</a></li>
 | 
					        <li><a href="{% url 'build-index' %}"><span class='fas fa-tools icon-header'></span>{% trans "Build" %}</a></li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
        {% if roles.purchase_order.view %}
 | 
					        {% if roles.purchase_order.view and enable_buy %}
 | 
				
			||||||
        <li class='nav navbar-nav'>
 | 
					        <li class='nav navbar-nav'>
 | 
				
			||||||
          <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-shopping-cart icon-header'></span>{% trans "Buy" %}</a>
 | 
					          <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-shopping-cart icon-header'></span>{% trans "Buy" %}</a>
 | 
				
			||||||
          <ul class='dropdown-menu'>
 | 
					          <ul class='dropdown-menu'>
 | 
				
			||||||
            <li><a href="{% url 'supplier-index' %}"><span class='fas fa-building icon-header'></span>{% trans "Suppliers" %}</a></li>
 | 
					            <li><a href="{% url 'supplier-index' %}"><span class='fas fa-building icon-header'></span>{% trans "Suppliers" %}</a></li>
 | 
				
			||||||
            <li><a href="{% url 'manufacturer-index' %}"><span class='fas fa-industry icon-header'></span>{% trans "Manufacturers" %}</a></li>
 | 
					            <li><a href="{% url 'manufacturer-index' %}"><span class='fas fa-industry icon-header'></span>{% trans "Manufacturers" %}</a></li>
 | 
				
			||||||
 | 
					            {% if enable_po %}
 | 
				
			||||||
            <li><a href="{% url 'po-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Purchase Orders" %}</a></li>
 | 
					            <li><a href="{% url 'po-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Purchase Orders" %}</a></li>
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
          </ul>
 | 
					          </ul>
 | 
				
			||||||
        </li>
 | 
					        </li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
        {% if roles.sales_order.view %}
 | 
					        {% if roles.sales_order.view and enable_sell %}
 | 
				
			||||||
        <li class='nav navbar-nav'>
 | 
					        <li class='nav navbar-nav'>
 | 
				
			||||||
          <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-truck icon-header'></span>{% trans "Sell" %}</a>
 | 
					          <a class='dropdown-toggle' data-toggle='dropdown' href='#'><span class='fas fa-truck icon-header'></span>{% trans "Sell" %}</a>
 | 
				
			||||||
          <ul class='dropdown-menu'>
 | 
					          <ul class='dropdown-menu'>
 | 
				
			||||||
            <li><a href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a>
 | 
					            <li><a href="{% url 'customer-index' %}"><span class='fas fa-user-tie icon-header'></span>{% trans "Customers" %}</a>
 | 
				
			||||||
 | 
					            {% if enable_so %}
 | 
				
			||||||
            <li><a href="{% url 'so-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Sales Orders" %}</a></li>
 | 
					            <li><a href="{% url 'so-index' %}"><span class='fas fa-list icon-header'></span>{% trans "Sales Orders" %}</a></li>
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
          </ul>
 | 
					          </ul>
 | 
				
			||||||
        </li>
 | 
					        </li>
 | 
				
			||||||
        {% endif %}
 | 
					        {% endif %}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user