fix - excel search fields

This commit is contained in:
2025-12-02 16:32:19 +03:30
parent eb271d736f
commit 887838c0a2

View File

@@ -199,6 +199,14 @@ class WareHouseExcelViewSet(viewsets.ModelViewSet, ExcelDynamicSearchMixin):
name='inventory_sale_transaction_excel'
)
def inventory_sale_transaction_excel(self, request):
self.search_fields = [
'rancher_fullname', 'rancher_mobile', 'pos_device__device_identity',
'pos_device__acceptor', 'pos_device__terminal', 'pos_device__serial',
'transaction_id', 'seller_organization__name',
'quota_distribution__distribution_id', 'weight', 'delivery_address', 'transaction_price',
'price_paid', 'price_type', 'product_type', 'transactions_number', 'transaction_status',
'transaction_status_code', 'ref_num', 'terminal', 'payer_cart', 'transaction_date',
]
output = BytesIO()
workbook = Workbook()
worksheet = workbook.active