2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-09 20:21:24 +00:00

Create missing tabs for sales orders

- Attachments
- Notes
This commit is contained in:
Oliver Walters
2020-04-20 22:33:49 +10:00
parent e12824df2e
commit 0c56079b41
5 changed files with 171 additions and 4 deletions

View File

@@ -181,7 +181,28 @@ class PurchaseOrderNotes(UpdateView):
ctx = super().get_context_data(**kwargs)
ctx['editing'] = str2bool(self.request.GET.get('edit', ''))
ctx['editing'] = str2bool(self.request.GET.get('edit', False))
return ctx
class SalesOrderNotes(UpdateView):
""" View for editing the 'notes' field of a SalesORder """
context_object_name = 'order'
template_name = 'order/sales_order_notes.html'
model = SalesOrder
fields = ['notes']
def get_success_url(self):
return reverse('so-notes', kwargs={'pk': self.get_object().pk})
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['editing'] = str2bool(self.request.GET.get('edit', False))
return ctx