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

@@ -14,7 +14,7 @@
</component>
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.10 (env)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.9 (dam_env)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">

2
.idea/misc.xml generated
View File

@@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.10 (env)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (env)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (dam_env)" project-jdk-type="Python SDK" />
</project>

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