aboutsummaryrefslogtreecommitdiffstats
path: root/servo/models
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-02-09 13:24:21 +0200
committerFilipp Lepalaan <filipp@mac.com>2016-02-09 13:24:21 +0200
commita4152df12962cb1a49fcfbf40a65a1eb0537c5c4 (patch)
treece5a3dede6c115ea465a3e4e7ab5a82a79192765 /servo/models
parent2b622e5b17e86f1b3a050fbaee7f16a508566386 (diff)
downloadServo-a4152df12962cb1a49fcfbf40a65a1eb0537c5c4.tar.gz
Servo-a4152df12962cb1a49fcfbf40a65a1eb0537c5c4.tar.bz2
Servo-a4152df12962cb1a49fcfbf40a65a1eb0537c5c4.zip
Default consignmentFlag of RepairOrderLines
Diffstat (limited to 'servo/models')
-rw-r--r--servo/models/parts.py6
1 files changed, 4 insertions, 2 deletions
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