mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 15:15:42 +00:00 
			
		
		
		
	Add a reminder for future-self
This commit is contained in:
		@@ -1140,6 +1140,8 @@ class BomItem(models.Model):
 | 
				
			|||||||
                if self.part == self.sub_part:
 | 
					                if self.part == self.sub_part:
 | 
				
			||||||
                    raise ValidationError({'sub_part': _('Part cannot be added to its own Bill of Materials')})
 | 
					                    raise ValidationError({'sub_part': _('Part cannot be added to its own Bill of Materials')})
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
 | 
					            # TODO - Make sure that there is no recusion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # Test for simple recursion
 | 
					            # Test for simple recursion
 | 
				
			||||||
            for item in self.sub_part.bom_items.all():
 | 
					            for item in self.sub_part.bom_items.all():
 | 
				
			||||||
                if self.part == item.sub_part:
 | 
					                if self.part == item.sub_part:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
    <li{% ifequal tab 'stock' %} class="active"{% endifequal %}>
 | 
					    <li{% ifequal tab 'stock' %} class="active"{% endifequal %}>
 | 
				
			||||||
        <a href="{% url 'part-stock' part.id %}">Stock <span class="badge">{{ part.total_stock }}</span></a>
 | 
					        <a href="{% url 'part-stock' part.id %}">Stock <span class="badge">{{ part.total_stock }}</span></a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
    {% if part.allocation_count > 0 %}
 | 
					    {% if part.component or part.used_in_count > 0 %}
 | 
				
			||||||
    <li{% ifequal tab 'allocation' %} class="active"{% endifequal %}>
 | 
					    <li{% ifequal tab 'allocation' %} class="active"{% endifequal %}>
 | 
				
			||||||
        <a href="{% url 'part-allocation' part.id %}">Allocated <span class="badge">{{ part.allocation_count }}</span></a>
 | 
					        <a href="{% url 'part-allocation' part.id %}">Allocated <span class="badge">{{ part.allocation_count }}</span></a>
 | 
				
			||||||
    </li>
 | 
					    </li>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user