mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Adds new setting to optionally display or hide part pricing information
This commit is contained in:
		@@ -776,6 +776,18 @@ class InvenTreeSetting(BaseInvenTreeSetting):
 | 
				
			|||||||
            'validator': bool,
 | 
					            'validator': bool,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # 2022-02-03
 | 
				
			||||||
 | 
					        # This setting exists as an interim solution for extremely slow part page load times when the part has a complex BOM
 | 
				
			||||||
 | 
					        # In an upcoming release, pricing history (and BOM pricing) will be cached,
 | 
				
			||||||
 | 
					        # rather than having to be re-calculated every time the page is loaded!
 | 
				
			||||||
 | 
					        # For now, we will simply hide part pricing by default
 | 
				
			||||||
 | 
					        'PART_SHOW_PRICE_HISTORY': {
 | 
				
			||||||
 | 
					            'name': _('Show Price History'),
 | 
				
			||||||
 | 
					            'description': _('Display historical pricing for Part'),
 | 
				
			||||||
 | 
					            'default': False,
 | 
				
			||||||
 | 
					            'validator': bool,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        'PART_SHOW_RELATED': {
 | 
					        'PART_SHOW_RELATED': {
 | 
				
			||||||
            'name': _('Show related parts'),
 | 
					            'name': _('Show related parts'),
 | 
				
			||||||
            'description': _('Display related parts for a part'),
 | 
					            'description': _('Display related parts for a part'),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,6 +15,7 @@
 | 
				
			|||||||
        {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_DUPLICATE_IPN" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_DUPLICATE_IPN" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_EDIT_IPN" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_ALLOW_EDIT_IPN" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PART_NAME_FORMAT" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_NAME_FORMAT" %}
 | 
				
			||||||
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_HISTORY" icon="fa-history" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_FORMS" icon="fa-dollar-sign" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_FORMS" icon="fa-dollar-sign" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_BOM" icon="fa-dollar-sign" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_PRICE_IN_BOM" icon="fa-dollar-sign" %}
 | 
				
			||||||
        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_RELATED" icon="fa-random" %}
 | 
					        {% include "InvenTree/settings/setting.html" with key="PART_SHOW_RELATED" icon="fa-random" %}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user