Merge branch 'feature/#79_agregar_filtro_y_ordenamiento' into 'develop'
se agrega id en ComprobanteFilter y el id del comprobante en el ordenamiento See merge request !73
Showing
2 changed files
with
2 additions
and
2 deletions
@@ -65,7 +65,7 @@ class ComprobanteViewSet(mixins.UpdateModelMixin, | @@ -65,7 +65,7 @@ class ComprobanteViewSet(mixins.UpdateModelMixin, | ||
65 | queryset = ComprobantePago.objects.all() | 65 | queryset = ComprobantePago.objects.all() |
66 | filter_backends = (DjangoFilterBackend, filters.OrderingFilter) | 66 | filter_backends = (DjangoFilterBackend, filters.OrderingFilter) |
67 | filter_class = ComprobanteFilter | 67 | filter_class = ComprobanteFilter |
68 | - ordering_fields = ('monto_descuento', 'monto_total', 'fecha_pago') | 68 | + ordering_fields = ('id','monto_descuento', 'monto_total', 'fecha_pago') |
69 | ordering = 'id' | 69 | ordering = 'id' |
70 | 70 | ||
71 | 71 |
@@ -39,13 +39,13 @@ class PrecioFilter(filters.FilterSet): | @@ -39,13 +39,13 @@ class PrecioFilter(filters.FilterSet): | ||
39 | 39 | ||
40 | 40 | ||
41 | class ComprobanteFilter(filters.FilterSet): | 41 | class ComprobanteFilter(filters.FilterSet): |
42 | + edicto_uuid = filters.CharFilter(field_name='edicto__uuid', lookup_expr='exact') | ||
42 | 43 | ||
43 | class Meta: | 44 | class Meta: |
44 | model = ComprobantePago | 45 | model = ComprobantePago |
45 | fields = { | 46 | fields = { |
46 | 'monto_descuento': ['contains'], | 47 | 'monto_descuento': ['contains'], |
47 | 'monto_total': ['contains'], | 48 | 'monto_total': ['contains'], |
48 | - 'edicto': ['exact'], | ||
49 | 'fecha_pago': ['exact'], | 49 | 'fecha_pago': ['exact'], |
50 | 'numero_comprobante': ['exact'], | 50 | 'numero_comprobante': ['exact'], |
51 | } | 51 | } |
-
Please register or login to post a comment