update excel

This commit is contained in:
2025-12-02 18:43:29 +03:30
parent fc866c887d
commit 971b3bf1b9
3 changed files with 5 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ from rest_framework.decorators import action
from apps.core.mixins.search_mixin import ExcelDynamicSearchMixin
from apps.warehouse import models as warehouse_models
from apps.warehouse.web.api.v1 import serializers as warehouse_serializers
from apps.authentication.services.visibility_services import apply_visibility_filter
from common.helper_excel import create_header, excel_description, create_header_freez, create_value, shamsi_date, \
convert_str_to_date
from common.helpers import get_organization_by_user
@@ -213,7 +214,9 @@ class WareHouseExcelViewSet(viewsets.ModelViewSet, ExcelDynamicSearchMixin):
worksheet.sheet_view.rightToLeft = True
worksheet.insert_rows(1)
org = get_organization_by_user(request.user)
queryset = warehouse_models.InventoryQuotaSaleTransaction.objects.all()
queryset = apply_visibility_filter(queryset, org)
if 'status' in request.GET.keys():
status_param = self.request.query_params.get('status') # noqa