From 23f35cfec06d4c3c73ae7a61017a304e5b8000f8 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 19 May 2021 20:58:48 +0300 Subject: Work authorization fixes --- servo/models/note.py | 2 +- servo/models/order.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'servo/models') diff --git a/servo/models/note.py b/servo/models/note.py index ab6b622..e7ab2dd 100644 --- a/servo/models/note.py +++ b/servo/models/note.py @@ -145,7 +145,7 @@ class Note(MPTTModel): (T_NOTE, _("Technician's Note")), (T_CUSTOMER_NOTE, _("Customer's Note")), (T_PROBLEM, _("Customer Reported Issue")), - (T_VERIFIED_PROBLEM, _("Verified Verified Issue")), + (T_VERIFIED_PROBLEM, _("Technician Verified Issue")), (T_DIAGNOSIS, _("Diagnosis")), (T_ESCALATION, _("Escalation")), ) diff --git a/servo/models/order.py b/servo/models/order.py index 574637d..8bf4dd6 100644 --- a/servo/models/order.py +++ b/servo/models/order.py @@ -287,10 +287,13 @@ class Order(models.Model): r = {'order': self} r['conf'] = Configuration.conf() r['title'] = _(u"Service Order #%s") % self.code + r['notes'] = self.note_set.filter(is_reported=True) + # TODO: replace with constants - r['issues'] = r['notes'].filter(type=2) + r['issues'] = r['notes'].filter(type=1) r['diagnoses'] = r['notes'].filter(type=3) + r['tech_notes'] = r['notes'].filter(type=0) r['verified_issues'] = r['notes'].filter(type=4) r['customer_notes'] = r['notes'].filter(type=5) -- cgit v1.2.3