role type key
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.0 on 2025-11-10 07:41
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('product', '0084_broker_fix_broker_price_state'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='broker',
|
||||
name='suggested_broker_price',
|
||||
field=models.PositiveBigIntegerField(default=0),
|
||||
),
|
||||
]
|
||||
@@ -1,16 +1,17 @@
|
||||
from apps.product.pos.api.v1.serializers import product_serializers as product_serializers
|
||||
from apps.pos_device.mixins.pos_device_mixin import POSDeviceMixin
|
||||
from apps.core.mixins.search_mixin import DynamicSearchMixin
|
||||
from apps.core.mixins.soft_delete_mixin import SoftDeleteMixin
|
||||
from django.db import transaction
|
||||
from rest_framework import status
|
||||
from rest_framework import viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.exceptions import APIException
|
||||
from apps.product import models as product_models
|
||||
from apps.pos_device import models as pos_models
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework import viewsets
|
||||
from rest_framework import status
|
||||
from django.db import transaction
|
||||
|
||||
from apps.core.mixins.search_mixin import DynamicSearchMixin
|
||||
from apps.core.mixins.soft_delete_mixin import SoftDeleteMixin
|
||||
from apps.pos_device import models as pos_models
|
||||
from apps.pos_device.mixins.pos_device_mixin import POSDeviceMixin
|
||||
from apps.product import models as product_models
|
||||
from apps.product.pos.api.v1.serializers import product_serializers as product_serializers
|
||||
|
||||
|
||||
def trash(queryset, pk): # noqa
|
||||
@@ -105,6 +106,7 @@ class POSFreeProductsViewSet(SoftDeleteMixin, viewsets.ModelViewSet, DynamicSear
|
||||
request.data.update({
|
||||
'organization': organization.id,
|
||||
'device': device.id,
|
||||
'company_fee': product_models.Broker.objects.get(organization=organization).company_fee,
|
||||
})
|
||||
|
||||
serializer = product_serializers.POSFreeProductSerializer(data=request.data, context={'device': device})
|
||||
|
||||
Reference in New Issue
Block a user