Add additionallLineItems for POs

This commit is contained in:
Matthias 2022-03-11 00:22:11 +01:00
parent 84a95aaadb
commit 0a1961bc31
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -1011,6 +1011,21 @@ class PurchaseOrderLineItem(OrderLineItem):
return max(r, 0)
class PurchaseOrderAdditionalLineItem(OrderAdditionalLineItem):
"""
Model for a single AdditionalLineItem in a PurchaseOrder
Attributes:
order: Link to the PurchaseOrder that this line item belongs to
title: title of line item
sale_price: The unit sale price for this OrderLineItem
"""
@staticmethod
def get_api_url():
return reverse('api-po-additional-line-list')
order = models.ForeignKey(PurchaseOrder, on_delete=models.CASCADE, related_name='additional_lines', verbose_name=_('Order'), help_text=_('Purchase Order'))
class SalesOrderLineItem(OrderLineItem):
"""
Model for a single LineItem in a SalesOrder