示例#1
0
 def mark_as_received_full_amount(self, request, queryset):
     """Marks the selected purchase info items as received and sets the received amount to the
     sale cost"""
     for item in queryset:
         self._mark_as_received_full_amount(item)
     return HttpResponseRedirect(PurchaseItem.get_admin_list_url())
示例#2
0
 def get_purchase_items_link(self, obj):
     """Gets a link to the admin page with the filter for this purchase order"""
     info = (PurchaseItem.get_admin_list_url(), obj.pk)
     url = '%s?purchase_order__id__exact=%s' % info
     return '<a href="%s">%s</a>' % (url, 'View purchase items')