From 875353ede58ea6ae52cb8aa6435dde0e50fec1fb Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Mon, 20 Sep 2010 12:06:48 +0530 Subject: [PATCH 01/23] [IMP]:Improve report 'Point Of Sale / Daily Operations /Sales Summary'. bzr revid: rch_open_erp-20100920063648-m9o3ysd72n36j7k9 --- .../report/pos_details_summary.py | 5 + .../report/pos_details_summary.rml | 469 ++++++++++-------- 2 files changed, 263 insertions(+), 211 deletions(-) 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 From 5fb2432893165b2934519b11939bc64db447a746 Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Mon, 20 Sep 2010 14:57:59 +0530 Subject: [PATCH 02/23] [IMP]: Improve report 'Auction Management/ Objects /Objects / Catelog'. bzr revid: rch_open_erp-20100920092759-yg2hrub0v8hm5hqk --- addons/auction/report/auction_catelog.rml | 62 +++++++++++------------ 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/addons/auction/report/auction_catelog.rml b/addons/auction/report/auction_catelog.rml index 02027055131..8a98fcac918 100644 --- a/addons/auction/report/auction_catelog.rml +++ b/addons/auction/report/auction_catelog.rml @@ -9,72 +9,69 @@ - - - - - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - [[ time.strftime('%Y-%m-%d') ]] + Catelog - + - + Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] + - Cat.N + Cat.N - Description + Description - Estimate + Estimate - [[ repeatIn(objects,'o') ]] [[o. obj_num ]] + [[ repeatIn(objects,'o') ]] [[o. obj_num ]] - [[o. name]] + [[o. name]] - [[o. lot_est1 ]]-[[o.lot_est2]] + [[formatLang(o. lot_est1) ]][[ company.currency_id.symbol ]]-[[formatLang(o.lot_est2)]][[ company.currency_id.symbol ]] @@ -82,5 +79,4 @@ - - + \ No newline at end of file From 33dccb70b8560504e85e5cdeb4e645f6baa77da2 Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Mon, 20 Sep 2010 17:49:43 +0530 Subject: [PATCH 03/23] [IMP]: Improve report 'Auction Management / Objects /Objects / Buyer list' - date format , title ,color ,font ,currency symbol. bzr revid: rch_open_erp-20100920121943-c8e228nljaym7w5x --- addons/auction/report/buyer_list.rml | 105 ++++++++++++++------------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/addons/auction/report/buyer_list.rml b/addons/auction/report/buyer_list.rml index 245617a7f86..4ac6e6694e1 100644 --- a/addons/auction/report/buyer_list.rml +++ b/addons/auction/report/buyer_list.rml @@ -12,85 +12,93 @@ - + + + + + - + - + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - [[ time.strftime('%d/%m/%Y')]] - [[ repeatIn(lines_lots_from_auction(objects),'o') ]] - - - - [[o['name'] or False]] + Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True)]] + [[ repeatIn(lines_lots_from_auction(objects),'o') ]] + + + + [[o['name'] or False]] + + +
- + - Buyer + Buyer - # + Lot - Adj(EUR) + Adj.([[ company.currency_id.code ]]) - Buyer costs([[ o['amount' ]*100 ]]%) + Buyer costs([[ o['amount' ]*100 ]]%) - To pay + To pay ([[ company.currency_id.code ]]) - [[ repeatIn(lines_lots_auct_lot(o),'a') ]] - [[ a['ach_uid'] ]] + [[ repeatIn(lines_lots_auct_lot(o),'a') ]][[ a['ach_uid'] ]] - [[ a['no_lot'] or '0.0' ]] + [[ a['no_lot'] or '0.0' ]] - [[ a['adj_price'] or '0.0' ]] - + [[ a['adj_price']) or '0.0' ]][[ company.currency_id.symbol ]] - [[ a['buyer_cost'] or '0.0' ]] + [[ a['buyer_cost'] or '0.0' ]][[ company.currency_id.symbol ]] - [[a['to_pay'] or '0.0' ]] + [[a['to_pay'] or '0.0' ]][[ company.currency_id.symbol ]] @@ -100,28 +108,27 @@ .........
- + - Total: + Total: - [[ '%.0f' % (sum_lots() or 0.0) ]] + [[ '%.0f' % (sum_lots() or 0.0) ]] - [[ '%.2f' % (sum_adj_price() or 0.0) ]] + [[ '%.2f' % (sum_adj_price() or 0.0 )]][[ company.currency_id.symbol ]] - [[ '%.2f' % (sum_buyer_obj_price() or 0.0) ]] + [[ '%.2f' % (sum_buyer_obj_price() or 0.0) ]][[ company.currency_id.symbol ]] - [[ '%.2f' % (sum_buyer_price() or 0.0) ]] + [[ '%.2f' % (sum_buyer_price() or 0.0) ]][[ company.currency_id.symbol ]] - +
- - + \ No newline at end of file From f7074a73e3424bb9967c307d9d4b5c6cc03516c9 Mon Sep 17 00:00:00 2001 From: "rch (Open ERP)" <> Date: Mon, 20 Sep 2010 18:44:48 +0530 Subject: [PATCH 04/23] [IMP]: Improve report 'Point Of Sale / Cash Register /All Registers/Statement' and 'Point Of Sale / Cash Register /All Registers/User's Product'. bzr revid: rch_open_erp-20100920131448-gomxvep4xmbj2tdx --- .../report/account_statement.rml | 259 +++++++++--------- .../report/pos_users_product.rml | 250 ++++++++--------- 2 files changed, 245 insertions(+), 264 deletions(-) diff --git a/addons/point_of_sale/report/account_statement.rml b/addons/point_of_sale/report/account_statement.rml index 180e9d6a97b..e4c3b99b6ee 100644 --- a/addons/point_of_sale/report/account_statement.rml +++ b/addons/point_of_sale/report/account_statement.rml @@ -1,6 +1,6 @@ -