From a4152df12962cb1a49fcfbf40a65a1eb0537c5c4 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 9 Feb 2016 13:24:21 +0200 Subject: Default consignmentFlag of RepairOrderLines --- servo/models/parts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'servo/models') diff --git a/servo/models/parts.py b/servo/models/parts.py index f854fdc..013b4cb 100644 --- a/servo/models/parts.py +++ b/servo/models/parts.py @@ -100,7 +100,7 @@ class ServicePart(models.Model): max_length=128, editable=False ) - + shipment = models.ForeignKey(Shipment, null=True) box_number = models.PositiveIntegerField(null=True) return_label = models.FileField( @@ -262,9 +262,10 @@ class ServicePart(models.Model): """ part = gsxws.ServicePart(self.part_number) part.returnOrderNumber = self.return_order + if self.box_number > 0: part.boxNumber = self.box_number - + return part def needs_comptia_code(self): @@ -280,6 +281,7 @@ class ServicePart(models.Model): """ ol = gsxws.RepairOrderLine() ol.partNumber = self.part_number + ol.consignmentFlag = False # @TODO: Put this in the GUI oi = self.order_item ol.abused = oi.is_abused -- cgit v1.2.3