diff --git a/addons/point_of_sale/report/pos_details_summary.py b/addons/point_of_sale/report/pos_details_summary.py index 579b28ca6ca..30cfdd7063c 100644 --- a/addons/point_of_sale/report/pos_details_summary.py +++ b/addons/point_of_sale/report/pos_details_summary.py @@ -20,7 +20,7 @@ ############################################################################## import time -import datetime +from datetime import datetime from report import report_sxw @@ -127,7 +127,7 @@ class pos_details_summary(report_sxw.rml_parse): def _get_end_period(self, objects): - date_orders = [obj.date_order for obj in objects] + date_orders = sorted([obj.date_order for obj in objects]) max_date = date_orders[-1] return '%s' % max_date diff --git a/addons/point_of_sale/report/pos_details_summary.rml b/addons/point_of_sale/report/pos_details_summary.rml index 466500f0960..2c119c103f1 100644 --- a/addons/point_of_sale/report/pos_details_summary.rml +++ b/addons/point_of_sale/report/pos_details_summary.rml @@ -2,7 +2,7 @@ @@ -44,46 +44,44 @@ - - - - - - - - - - - - - + - - + + - + + + + + + + + + + + - - + + @@ -102,12 +100,8 @@ - - - - - - + + @@ -146,14 +140,11 @@ - + Details of Sales + - Details of Sales - - - - + Company @@ -169,16 +160,16 @@ - + - [[ '%s' % getcompany(objects)]] + [[ company.name ]] [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] - [[ '%s' % getstartperiod(objects) ]] + [[ '%s' % getstartperiod(objects) ]] [[ '%s' % getendperiod(objects) ]] @@ -188,13 +179,18 @@ - +
+ + + +
+ Mode of Taxes - + @@ -202,27 +198,30 @@
[[ repeatIn(gettaxamount(objects).items(),'p') ]] - + - [[ p[0] ]] + [[ p[0] ]] [[ p[1] ]] [[company.currency_id.symbol]] - +
- + + + + Mode of Payment - + @@ -230,10 +229,10 @@
[[ repeatIn(getpayments(objects).items(),'t') ]] - + - [[ t[0] ]] + [[ t[0] ]] [[ '%.2f' % (t[1],) ]] [[company.currency_id.symbol]] @@ -244,25 +243,28 @@
- + + + + - Summary + Summary - + - + Sales total - [[ '%d' % getsalestotal(objects) ]] [[company.currency_id.symbol ]] + [[ '%d' % getsalestotal(objects) ]] @@ -306,7 +308,7 @@ - +