diff --git a/addons/point_of_sale/report/pos_details_summary.py b/addons/point_of_sale/report/pos_details_summary.py index 2d1fd0b98c7..7a57e17bf87 100644 --- a/addons/point_of_sale/report/pos_details_summary.py +++ b/addons/point_of_sale/report/pos_details_summary.py @@ -25,6 +25,10 @@ from report import report_sxw class pos_details_summary(report_sxw.rml_parse): + def get_company(self,objects): + comp=[obj.company_id.name for obj in objects] + return '%s' % (comp[0]) + def _get_qty_total(self, objects): #code for the sum of qty_total return reduce(lambda acc, object: @@ -122,6 +126,7 @@ class pos_details_summary(report_sxw.rml_parse): 'gettaxamount': self._get_tax_amount, 'getsalestotal': self._get_sales_total, 'getperiod': self._get_period, + 'getcompany':self.get_company }) report_sxw.report_sxw('report.pos.details_summary', diff --git a/addons/point_of_sale/report/pos_details_summary.rml b/addons/point_of_sale/report/pos_details_summary.rml index 3981f389166..aa559eb9961 100644 --- a/addons/point_of_sale/report/pos_details_summary.rml +++ b/addons/point_of_sale/report/pos_details_summary.rml @@ -1,251 +1,298 @@ - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + - + - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Detail of Sales - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Details of Sales + + + + - Company + Company - Print Date + Print Date - Period + Period - + - [[ company.name ]] + [[ '%s' % getcompany(objects)]] - [[time.strftime('%Y-%m-%d')]] + [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] [[ '%s' % getperiod(objects) ]] - - - + + - - - - - - - - - - - - - Mode of Taxes - - - - - [[ repeatIn(gettaxamount(objects).items(), 'p') ]] - [[ p[0] ]] - [[ '%.2f' % (p[1],) ]] - - - - - - - - Mode of payment - - - - - [[ repeatIn(getpayments(objects).items(), 'p') ]] - [[ p[0] ]] - [[ '%.2f' % (p[1],) ]] - - - - - - - + + + + Mode of Taxes + + + - + + + + + + [[ repeatIn(gettaxamount(objects).items(),'p') ]] + [[ p[0] ]] + + + + [[ p[1] ]] + + + + + + + Mode of Payment + + + - - - - Summary - - - Sales total - terp_tblheader_Details - [[ '%d' % getsalestotal(objects) ]] - - - Qty of product - [[ '%d' % getqtytotal(objects) ]] - - - Total invoiced - [[ '%.2f' % getsuminvoice(objects) ]] - - - Total discount - [[ '%.2f' % getsumdisc(objects) ]] - - - Total paid - [[ '%.2f' % getpaidtotal(objects) ]] - - - Total of the day - [[ '%.2f' % gettotalofthaday(objects) ]] - - - - - - + + + + + + [[ repeatIn(getpayments(objects).items(),'t') ]] + [[ t[0] ]] + + + + [[ '%.2f' % (t[1],) ]] + + + + + + + + + + + + + + + + + + + Summary + + + + + + + + + + + + Sales total + + + [[ '%d' % getsalestotal(objects) ]] + + + + + Qty of product + + + [[ '%d' % getqtytotal(objects) ]] + + + + + Total invoiced + + + [[ '%.2f' % getsuminvoice(objects) ]][[ company.currency_id.symbol ]] + + + + + Total discount + + + [[ '%.2f' % getsumdisc(objects) ]][[ company.currency_id.symbol ]] + + + + + Total paid + + + [[ '%.2f' % getpaidtotal(objects) ]][[ company.currency_id.symbol ]] + + + + + Total of the day + + + [[ '%.2f' % gettotalofthaday(objects) ]][[ company.currency_id.symbol ]] + + + + + + + + \ No newline at end of file