2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-13 15:20:53 +00:00

Added further part pricing

This commit is contained in:
Oliver Walters
2019-05-21 14:08:40 +10:00
parent cdcc4f9ca1
commit 2817e6ca31
4 changed files with 29 additions and 9 deletions

@@ -710,7 +710,7 @@ class Part(models.Model):
if kwargs.get('image', True):
if other.image:
image_file = ContentFile(other.image.read())
image_file.name = rename_part_image(self, 'test.png')
image_file.name = rename_part_image(self, other.image.url)
self.image = image_file

@@ -68,3 +68,7 @@ class PartTest(TestCase):
barcode = self.R1.format_barcode()
self.assertIn('InvenTree', barcode)
self.assertIn(self.R1.name, barcode)
def test_copy(self):
self.R2.deepCopy(self.R1, image=True, bom=True)