diff --git a/.idea/Rasaddam_Backend.iml b/.idea/Rasaddam_Backend.iml index 168bde0..9e31677 100644 --- a/.idea/Rasaddam_Backend.iml +++ b/.idea/Rasaddam_Backend.iml @@ -14,7 +14,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index f1b70db..e547571 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/apps/warehouse/services/excel/excel_processing.py b/apps/warehouse/services/excel/excel_processing.py index 4a3bd66..c2d735d 100644 --- a/apps/warehouse/services/excel/excel_processing.py +++ b/apps/warehouse/services/excel/excel_processing.py @@ -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