Changes between Initial Version and Version 1 of Ticket #27812


Ignore:
Timestamp:
Feb 6, 2017, 10:36:12 AM (8 years ago)
Author:
Fabio García Sánchez
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27812 – Description

    initial v1  
    66print(qs1 )
    77<QuerySet [{'tipo_documento': 'FV', 'total': Decimal('8419159.0000')}, {'tipo_documento': 'FY', 'total': Decimal('12500000.0000')}, {'tipo_documento': 'FY', 'total': Decimal('210000.0000')}...
     8}}}
     9
     10debug_toolbar shows, effectively is grouping by "document_date", but I have just "tipo_documento" in values:
     11{{{
     12SELECT `biable_facturasbiable`.`tipo_documento`, SUM(`biable_facturasbiable`.`venta_neto`) AS `cosa` FROM `biable_facturasbiable` GROUP BY `biable_facturasbiable`.`tipo_documento`, `biable_facturasbiable`.`document_date` ORDER BY `biable_facturasbiable`.`document_date` DESC LIMIT 21
    813}}}
    914
     
    1924qs2 works properly. I have tried to do the same example with another models and I have got the same issue.
    2025
     26debug_toolbar shows:
     27
     28{{{
     29SELECT `biable_movimientoventabiable`.`tipo_documento`, SUM(`biable_movimientoventabiable`.`venta_neto`) AS `cosa` FROM `biable_movimientoventabiable` GROUP BY `biable_movimientoventabiable`.`tipo_documento` ORDER BY NULL LIMIT 21
     30}}}
     31
    2132
    2233Thanks
Back to Top