diff --git a/addons/account/project/report/analytic_balance.py b/addons/account/project/report/analytic_balance.py index 780c519c1d4..3df4fd9584b 100644 --- a/addons/account/project/report/analytic_balance.py +++ b/addons/account/project/report/analytic_balance.py @@ -64,7 +64,6 @@ class account_analytic_balance(report_sxw.rml_parse): self.empty_acc = empty_acc self.read_data = [] self.get_children(self.ids) - return self.read_data def _lines_g(self, account_id, date1, date2): @@ -104,14 +103,14 @@ class account_analytic_balance(report_sxw.rml_parse): query_params = (tuple(ids), date1, date2) if option == "credit" : - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params) elif option == "debit" : - self.cr.execute("SELECT sum(amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s\ AND date>=%s AND date<=%s AND amount>0",query_params) elif option == "quantity" : - self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s\ AND date>=%s AND date<=%s",query_params) return self.cr.fetchone()[0] or 0.0 @@ -132,15 +131,16 @@ class account_analytic_balance(report_sxw.rml_parse): self.acc_sum_list = ids2 else: ids2 = self.acc_sum_list - query_params = (tuple(ids2), date1, date2) + + query_params = (tuple(ids2), date1, date2) if option == "debit" : - self.cr.execute("SELECT sum(amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0",query_params) elif option == "credit" : - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params) elif option == "quantity" : - self.cr.execute("SELECT sum(unit_amount) FROM account_analytic_line \ + self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \ WHERE account_id IN %s AND date>=%s AND date<=%s",query_params) return self.cr.fetchone()[0] or 0.0 diff --git a/addons/account/project/report/analytic_balance.rml b/addons/account/project/report/analytic_balance.rml index 52878d08612..bbd7e409dc0 100644 --- a/addons/account/project/report/analytic_balance.rml +++ b/addons/account/project/report/analytic_balance.rml @@ -107,13 +107,13 @@ Account Name - Debit([[ company.currency_id.name]]) + Debit - Credit([[ company.currency_id.name]]) + Credit - Balance([[ company.currency_id.name]]) + Balance Quantity @@ -130,14 +130,14 @@ - + - [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'debit')) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'debit')) ]] - [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] [[ company.currency_id.symbol]] + [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'credit')) ]] [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] @@ -147,9 +147,6 @@ - - -
[[ repeatIn(get_objects(data['form']['empty_acc']),'o') ]] @@ -161,10 +158,10 @@ [[ o['complete_name'] ]] - [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]] - [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] @@ -188,10 +185,10 @@ [[ move_g['name'] ]] - [[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol ]] + [[ formatLang(move_g['debit'])]] - [[ formatLang(move_g['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(move_g['credit']) ]] [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol ]] diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml index ad1fef8e96e..bc3f2f2d7ca 100644 --- a/addons/account/project/report/cost_ledger.rml +++ b/addons/account/project/report/cost_ledger.rml @@ -175,13 +175,13 @@ J.C. /Move name - Debit([[ company.currency_id.code]]) + Debit - Credit([[ company.currency_id.code]]) + Credit - Balance([[ company.currency_id.code]]) + Balance @@ -199,10 +199,10 @@ - [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] @@ -223,10 +223,10 @@ [[ o.complete_name ]] - [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (account_sum_debit(o.id,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang (account_sum_credit(o.id,data['form']['date1'],data['form']['date2'])) ]] [[ formatLang (account_sum_balance(o.id,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol ]] @@ -247,10 +247,10 @@ [[ move_g['name'] ]] - [[ formatLang( move_g['debit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang( move_g['debit']) ]] - [[ formatLang( move_g['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang( move_g['credit']) ]] [[ formatLang( move_g['balance']) ]] [[ company.currency_id.symbol ]] @@ -274,13 +274,13 @@ [[ move_a['name'] ]] - [[ formatLang( move_a['debit'] )]] [[ company.currency_id.symbol]] + [[ formatLang( move_a['debit'] )]] - [[ formatLang( move_a['credit']) ]] [[ company.currency_id.symbol]] + [[ formatLang( move_a['credit']) ]] - [[ formatLang( move_a['balance']) ]] [[ company.currency_id.symbol]] + [[ formatLang( move_a['balance']) ]] diff --git a/addons/account/project/report/inverted_analytic_balance.rml b/addons/account/project/report/inverted_analytic_balance.rml index 1404183e913..6de2e28d46e 100644 --- a/addons/account/project/report/inverted_analytic_balance.rml +++ b/addons/account/project/report/inverted_analytic_balance.rml @@ -106,13 +106,13 @@ Name - Debit([[ company.currency_id.code]]) + Debit - Credit([[ company.currency_id.code]]) + Credit - Balance([[ company.currency_id.code]]) + Balance Quantity @@ -133,10 +133,10 @@ - [[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] [[ company.currency_id.symbol]] + [[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] - [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]] + [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']))]] [[ company.currency_id.symbol]] @@ -157,10 +157,10 @@ [[ move_g['name'] ]] - [[ formatLang(move_g['debit'])]] [[ company.currency_id.symbol]] + [[ formatLang(move_g['debit'])]] - [[formatLang(move_g['credit'])]] [[ company.currency_id.symbol]] + [[formatLang(move_g['credit'])]] [[ formatLang(move_g['balance'])]] [[ company.currency_id.symbol]] @@ -181,10 +181,10 @@ [[ move_a['complete_name'] ]] - [[ formatLang(move_a['debit']) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_a['debit']) ]] - [[ formatLang(move_a['credit']) ]] [[ company.currency_id.symbol]] + [[ formatLang(move_a['credit']) ]] [[ formatLang(move_a['balance']) ]] [[ company.currency_id.symbol]] diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml index 122e90261e9..7f90ae0983b 100644 --- a/addons/account/report/account_aged_partner_balance.rml +++ b/addons/account/report/account_aged_partner_balance.rml @@ -186,7 +186,7 @@ [[ data['form']['0']['name'] ]]([[ company.currency_id.code ]]) - Total([[ company.currency_id.code ]]) + Total diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml index 5d71ef95c39..fac1983ef25 100644 --- a/addons/account/report/account_balance.rml +++ b/addons/account/report/account_balance.rml @@ -287,15 +287,15 @@ Code Account - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance [[ repeatIn(lines(data['form']), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] - [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] [[ company.currency_id.symbol ]] - [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['debit']) ]][[ a['type']<>'view' and removeParentNode('font') ]] [[formatLang(a['debit']) ]] + [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font')]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['credit']) ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['credit']) ]] [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['type']=='view' and removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_balance_sheet.rml b/addons/account/report/account_balance_sheet.rml index 052ecce16cb..8887fa49808 100644 --- a/addons/account/report/account_balance_sheet.rml +++ b/addons/account/report/account_balance_sheet.rml @@ -25,19 +25,8 @@ - - - - - - - - - - - - - + + @@ -63,19 +52,8 @@ - - - - - - - - - - - - - + + @@ -215,9 +193,16 @@ - + + + + + Assets + + + @@ -230,7 +215,7 @@ Assets - Total Amount([[ get_currency(data) ]]) + Balance @@ -248,7 +233,7 @@ - Balance:([[ get_currency(data) ]]) + Balance: [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]] @@ -259,6 +244,13 @@ + + + + Liabilities + + + @@ -268,7 +260,7 @@ Liabilities - Total Amount([[ get_currency(data) ]]) + Balance @@ -286,7 +278,7 @@ - Balance:([[ get_currency(data) ]]) + Balance: [[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_balance_sheet_horizontal.rml b/addons/account/report/account_balance_sheet_horizontal.rml index 0d35f0ff262..a1f7b25d379 100644 --- a/addons/account/report/account_balance_sheet_horizontal.rml +++ b/addons/account/report/account_balance_sheet_horizontal.rml @@ -26,31 +26,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -67,31 +44,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -251,7 +204,7 @@ Assets - Total Amount([[ get_currency(data) ]]) + Balance Code @@ -260,7 +213,7 @@ Liabilities - Total Amount([[ get_currency(data) ]]) + Balance @@ -287,13 +240,13 @@ - Balance:([[ get_currency(data) ]]) + Balance: [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]] - Balance:([[ get_currency(data) ]]) + Balance: [[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml index 2f3b8859d3a..4bf23b3d4b6 100644 --- a/addons/account/report/account_central_journal.rml +++ b/addons/account/report/account_central_journal.rml @@ -278,18 +278,18 @@ A/C No. Account Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance [[ display_currency(data) or removeParentNode('blockTable') ]] A/C No. Account Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Currency @@ -297,8 +297,8 @@ Total([[ company.currency_id.code]]): - [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] - [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] + [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]] @@ -306,8 +306,8 @@ Total:([[ company.currency_id.code]]) - [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] - [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang( sum_debit(o.period_id.id, o.journal_id.id)) ]] + [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang( sum_credit(o.period_id.id, o.journal_id.id)-sum_debit(o.period_id.id, o.journal_id.id) ) ]] [[ company.currency_id.symbol ]] @@ -318,8 +318,8 @@ [[ line['code'] ]] [[ line['name'] ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit'])]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit'])]] [[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]] @@ -327,8 +327,8 @@ [[ line['code'] ]] [[ line['name'] ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit'])]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit'])]] [[ formatLang(line['credit']-line['debit']) ]] [[ company.currency_id.symbol ]] [[ line['currency_id'] and formatLang(line['amount_currency'] or '') ]] [[ line['currency_id'] and line['currency_code'] or '']] diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml index 2f7a01771eb..0fced27408d 100644 --- a/addons/account/report/account_general_journal.rml +++ b/addons/account/report/account_general_journal.rml @@ -265,15 +265,15 @@ Code Journal Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Total:([[ company.currency_id.code]]) - [[ formatLang(sum_debit()) ]] [[ company.currency_id.symbol ]] - [[ formatLang( sum_credit()) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit()) ]] + [[ formatLang( sum_credit()) ]] [[ formatLang( sum_debit()- sum_credit()) ]] [[ company.currency_id.symbol ]] @@ -281,16 +281,16 @@ Code Journal Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Currency Total:([[ company.currency_id.code]]) - [[ formatLang(sum_debit()) ]] [[ company.currency_id.symbol ]] - [[ formatLang( sum_credit()) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit()) ]] + [[ formatLang( sum_credit()) ]] [[ formatLang( sum_credit()- sum_debit()) ]] [[ company.currency_id.symbol ]] @@ -306,10 +306,10 @@ - [[ formatLang(sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit_period(o.id)) ]] - [[ formatLang(sum_credit_period(o.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_credit_period(o.id)) ]] [[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]] @@ -332,10 +332,10 @@ - [[ formatLang(sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit_period(o.id)) ]] - [[ formatLang(sum_credit_period(o.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_credit_period(o.id)) ]] [[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id)) ]] [[ company.currency_id.symbol ]] @@ -353,10 +353,10 @@ [[ line['name'] ]] - [[ formatLang(line['debit'] )]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit'] )]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['credit']-line['debit'] ) ]] [[ company.currency_id.symbol ]] @@ -370,8 +370,8 @@ [[ repeatIn(lines(o.id),'line')]] [[ line['code'] ]] [[ line['name'] ]] - [[ formatLang(line['debit'] )]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit'] )]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['credit']-line['debit'] ) ]] [[ company.currency_id.symbol ]] [[ line['currency_id'] and formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] diff --git a/addons/account/report/account_general_ledger.py b/addons/account/report/account_general_ledger.py index f313704bc8a..d8ab573b083 100644 --- a/addons/account/report/account_general_ledger.py +++ b/addons/account/report/account_general_ledger.py @@ -44,6 +44,15 @@ class general_ledger(rml_parse.rml_parse, common_report_header): self.init_balance = data['form']['initial_balance'] self.display_account = data['form']['display_account'] self.target_move = data['form'].get('target_move', 'all') + ctx = self.context.copy() + ctx['fiscalyear'] = data['form']['fiscalyear_id'] + if data['form']['filter'] == 'filter_period': + ctx['periods'] = data['form']['periods'] + elif data['form']['filter'] == 'filter_date': + ctx['date_from'] = data['form']['date_from'] + ctx['date_to'] = data['form']['date_to'] + ctx['state'] = data['form']['target_move'] + self.context.update(ctx) if (data['model'] == 'ir.ui.menu'): new_ids = [data['form']['chart_account_id']] objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids) @@ -93,7 +102,7 @@ class general_ledger(rml_parse.rml_parse, common_report_header): def get_children_accounts(self, account): res = [] ids_acc = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, account.id) - for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc): + for child_account in self.pool.get('account.account').browse(self.cr, self.uid, ids_acc, context=self.context): sql = """ SELECT count(id) FROM account_move_line AS l @@ -203,6 +212,8 @@ class general_ledger(rml_parse.rml_parse, common_report_header): return res def _sum_debit_account(self, account): + if account.type == 'view': + return account.debit move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted',''] @@ -227,6 +238,8 @@ class general_ledger(rml_parse.rml_parse, common_report_header): return sum_debit def _sum_credit_account(self, account): + if account.type == 'view': + return account.credit move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted',''] @@ -251,6 +264,8 @@ class general_ledger(rml_parse.rml_parse, common_report_header): return sum_credit def _sum_balance_account(self, account): + if account.type == 'view': + return account.balance move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted',''] diff --git a/addons/account/report/account_general_ledger.rml b/addons/account/report/account_general_ledger.rml index 1884c302209..5a3812206aa 100644 --- a/addons/account/report/account_general_ledger.rml +++ b/addons/account/report/account_general_ledger.rml @@ -244,9 +244,9 @@ Ref Move Entry Label - Debit([[ company.currency_id.code]]) - Crebit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Crebit + Balance
@@ -256,10 +256,10 @@ - [[ o.code or '']] [[ o.name or '']] + [[ '..'*(o.level-1) ]][[ o.code or '']] [[ o.name or '']] - [[formatLang(sum_debit_account(o)) ]] [[ company.currency_id.symbol ]] - [[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]] + [[formatLang(sum_debit_account(o)) ]] + [[formatLang(sum_credit_account(o)) ]] [[ formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] @@ -278,8 +278,8 @@ [[ line['lref'] or '']] [[ line['move'] or '']] [[ line['lname'] or '' ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] @@ -294,9 +294,9 @@ Ref Move Entry Label - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Currency @@ -307,10 +307,10 @@ - [[ o.code or '' ]] [[ o.name or '' ]] + [[ '..'*(o.level-1) ]][[ o.code or '' ]] [[ o.name or '' ]] - [[formatLang(sum_debit_account(o)) ]] [[ company.currency_id.symbol ]] - [[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]] + [[formatLang(sum_debit_account(o)) ]] + [[formatLang(sum_credit_account(o)) ]] [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] [[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.symbol or '' ]] @@ -331,8 +331,8 @@ [[ line['lref'] or '']] [[ line['move'] or '' ]] [[ line['lname'] or '' ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] [[ formatLang(line['amount_currency'] or '') ]] [[ line['currency_code'] or '']] diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml index 11065d3fc49..80a55c76905 100644 --- a/addons/account/report/account_general_ledger_landscape.rml +++ b/addons/account/report/account_general_ledger_landscape.rml @@ -240,7 +240,7 @@ - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] + [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] Date JNRL @@ -249,9 +249,9 @@ Move Entry Label Counterpart - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Currency @@ -259,15 +259,15 @@ [[ repeatIn(get_children_accounts(a), 'o') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] + [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - [[ o.code ]] [[ o.name ]] + [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - [[formatLang(sum_debit_account(o)) ]] [[ company.currency_id.symbol ]] - [[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]] + [[formatLang(sum_debit_account(o)) ]] + [[formatLang(sum_credit_account(o)) ]] [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] [[ o.currency_id and sum_currency_amount_account(o) +o.currency_id.code or '' ]] @@ -292,8 +292,8 @@ [[ line['move'] ]] [[ line['lname'] ]] [[ strip_name(line['line_corresp'].replace(', ',','),40) ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] [[ formatLang(line['amount_currency'] or '')]] [[ line['currency_code'] or '' ]] @@ -301,7 +301,7 @@
- [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] Date JNRL @@ -310,9 +310,9 @@ Move Entry Label Counterpart - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance @@ -320,15 +320,15 @@ [[ repeatIn(get_children_accounts(a), 'o') ]] - [[data['form']['amount_currency'] == False or removeParentNode('blockTable')]] + [[data['form']['amount_currency'] == False or removeParentNode('blockTable')]] - [[ o.code ]] [[ o.name ]] + [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - [[formatLang(sum_debit_account(o)) ]] [[ company.currency_id.symbol ]] - [[formatLang(sum_credit_account(o)) ]] [[ company.currency_id.symbol ]] + [[formatLang(sum_debit_account(o)) ]] + [[formatLang(sum_credit_account(o)) ]] [[formatLang(sum_balance_account(o)) ]] [[ company.currency_id.symbol ]] @@ -352,8 +352,8 @@ [[ line['move'] ]] [[ line['lname'] ]] [[ strip_name(line['line_corresp'],15) ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] + [[ formatLang(line['credit']) ]] [[ formatLang(line['progress']) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml index 41261a12c1a..e153ae20adb 100644 --- a/addons/account/report/account_journal.rml +++ b/addons/account/report/account_journal.rml @@ -253,9 +253,9 @@ A/c No. Partner Move - Entry label - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance [[o.period_id.name ]] @@ -263,8 +263,8 @@ - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] + [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang((sum_credit(o.period_id.id, o.journal_id.id) - sum_debit(o.period_id.id, o.journal_id.id))) ]] [[ company.currency_id.symbol ]] [[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]] @@ -274,8 +274,8 @@ [[ line.account_id.code ]] [[ line.partner_id and line.partner_id.name ]] [[ line.move_id.name ]] - [[ line.name ]] - [[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line.debit) ]] + [[ formatLang(line.credit) ]] [[ formatLang(line.credit - line.debit) ]] [[ company.currency_id.symbol ]] @@ -288,9 +288,9 @@ A/c No. Partner Move - Entry label - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) + Debit + Credit + Balance Currency @@ -299,8 +299,8 @@ - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id)) ]] + [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id)) ]] [[ formatLang((sum_debit(o.period_id.id, o.journal_id.id) - sum_credit(o.period_id.id, o.journal_id.id))) ]] [[ company.currency_id.symbol ]] [[lines(o.period_id.id, o.journal_id.id) or removeParentNode('story') ]] @@ -310,8 +310,8 @@ [[ line.account_id.code ]] [[ line.partner_id and line.partner_id.name ]] [[ line.move_id.name ]] - [[ line.name ]] - [[ formatLang(line.debit) ]] [[ company.currency_id.symbol ]] - [[ formatLang(line.credit) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line.debit) ]] + [[ formatLang(line.credit) ]] [[ formatLang(line.credit - line.debit) ]] [[ company.currency_id.symbol ]] [[ line.currency_id and formatLang(line.amount_currency) or '' ]] [[ line.currency_id.symbol or '']] diff --git a/addons/account/report/account_partner_balance.rml b/addons/account/report/account_partner_balance.rml index c5ea2946507..a11df4e7576 100644 --- a/addons/account/report/account_partner_balance.rml +++ b/addons/account/report/account_partner_balance.rml @@ -231,24 +231,24 @@ Code (Account/Partner) Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Balance([[ company.currency_id.code]]) - In dispute([[ company.currency_id.code]]) + Debit + Credit + Balance + In dispute - Total([[ company.currency_id.code]]) : + Total: - [[ formatLang(sum_debit()) ]] [[ company.currency_id.symbol ]] - [[ formatLang(sum_credit()) ]] [[ company.currency_id.symbol ]] + [[ formatLang(sum_debit()) ]] + [[ formatLang(sum_credit()) ]] [[ formatLang((solde_debit()-solde_credit())) ]] [[ company.currency_id.symbol ]] [[ formatLang(sum_litige()) ]] [[ company.currency_id.symbol ]] [[ repeatIn(lines(), 'a') ]][[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['ref'] ]] [[ a['type']==3 and a['code'] ]] [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['name'] ]] - [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['debit']) ]] [[ company.currency_id.symbol ]] - [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ company.currency_id.symbol ]] + [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['debit']) ]] + [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['credit']) ]] [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['balance']) ]] [[ company.currency_id.symbol ]] [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['enlitige'] or 0.0) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml index 88b61dd43f6..7de67780056 100644 --- a/addons/account/report/account_partner_ledger.rml +++ b/addons/account/report/account_partner_ledger.rml @@ -295,13 +295,13 @@ Entry Label - Debit([[ get_currency(data) ]]) + Debit - Credit([[ get_currency(data) ]]) + Credit - Balance([[ get_currency(data) ]]) + Balance @@ -318,10 +318,10 @@ [[ p.ref ]] - [[ p.name ]] - [[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_debit_partner(p))) ]] - [[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_credit_partner(p))) ]] [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] @@ -332,10 +332,10 @@ Initial Balance - [[ formatLang(get_intial_balance(p)[0][0])]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][0])]] - [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]] @@ -365,10 +365,10 @@ [[ line['ref'] ]] - [[ line['name'] ]] - [[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['debit'])) ]] - [[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['credit'])) ]] [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] @@ -397,13 +397,13 @@ Entry Label - Debit([[ get_currency(data) ]]) + Debit - Credit([[ get_currency(data) ]]) + Credit - Balance([[ get_currency(data) ]]) + Balance Currency @@ -423,10 +423,10 @@ [[ p.ref ]] - [[ p.name ]] - [[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_debit_partner(p))) ]] - [[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_credit_partner(p))) ]] [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] @@ -442,10 +442,10 @@ Initial Balance - [[ formatLang(get_intial_balance(p)[0][0]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][0]) ]] - [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]] @@ -478,10 +478,10 @@ [[ (line['ref'] or '') + ' ' + line['name'] ]] - [[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['debit'])) ]] - [[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['credit'])) ]] [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml index 1e8429546db..53cb0d46d83 100644 --- a/addons/account/report/account_partner_ledger_other.rml +++ b/addons/account/report/account_partner_ledger_other.rml @@ -449,13 +449,13 @@ Entry Label - Debit([[ get_currency(data) ]]) + Debit - Credit([[ get_currency(data) ]]) + Credit - Balance([[ get_currency(data) ]]) + Balance @@ -468,10 +468,10 @@ [[ p.ref ]] - [[ p.name ]] - [[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_debit_partner(p))) ]] - [[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_credit_partner(p))) ]] [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] @@ -482,10 +482,10 @@ Initial Balance - [[ formatLang(get_intial_balance(p)[0][0])]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][0])]] - [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]] @@ -512,10 +512,10 @@ [[ (line['ref'] or '') + ' ' + line['name'] ]] - [[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['debit'])) ]] - [[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['credit'])) ]] [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] @@ -542,13 +542,13 @@ Entry Label - Debit([[ get_currency(data) ]]) + Debit - Credit([[ get_currency(data) ]]) + Credit - Balance([[ get_currency(data) ]]) + Balance Currency @@ -565,10 +565,10 @@ [[ p.ref ]] - [[ p.name ]] - [[ formatLang((sum_debit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_debit_partner(p))) ]] - [[ formatLang((sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((sum_credit_partner(p))) ]] [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p))) ]] [[ company.currency_id.symbol ]] @@ -584,10 +584,10 @@ Initial Balance - [[ formatLang(get_intial_balance(p)[0][0]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][0]) ]] - [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ company.currency_id.symbol ]] + [[ formatLang(get_intial_balance(p)[0][1]) ]] [[ formatLang(get_intial_balance(p)[0][2]) ]] [[ company.currency_id.symbol ]] @@ -617,10 +617,10 @@ [[ (line['ref'] or '') + ' ' + line['name'] ]] - [[ formatLang((line['debit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['debit'])) ]] - [[ formatLang((line['credit'])) ]] [[ company.currency_id.symbol ]] + [[ formatLang((line['credit'])) ]] [[ formatLang((line['progress'])) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_profit_horizontal.rml b/addons/account/report/account_profit_horizontal.rml index 84e39da1a38..d55b2e93a43 100644 --- a/addons/account/report/account_profit_horizontal.rml +++ b/addons/account/report/account_profit_horizontal.rml @@ -29,31 +29,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -74,31 +51,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -249,7 +202,7 @@ Perticular - Total Amount([[ get_currency(data) ]]) + Balance Code @@ -258,7 +211,7 @@ Perticular - Total Amount([[ get_currency(data) ]]) + Balance @@ -317,13 +270,13 @@ - Total:([[ get_currency(data['form']) ]] [[ company.currency_id.code]] ) + Total: [[ formatLang(abs(sum_dr())) ]] [[ company.currency_id.symbol ]] - Total:([[ get_currency(data['form']) ]] [[ company.currency_id.code]]) + Total: [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_profit_loss.rml b/addons/account/report/account_profit_loss.rml index 144cd33fff6..272945e658e 100644 --- a/addons/account/report/account_profit_loss.rml +++ b/addons/account/report/account_profit_loss.rml @@ -25,19 +25,8 @@ - - - - - - - - - - - - - + + @@ -50,36 +39,13 @@ - - - - - - - - - - - - - + - - - - - - - - - - - - - + + @@ -89,19 +55,7 @@ - - - - - - - - - - - - - + @@ -249,7 +203,7 @@ Expenses - Total Amount([[ get_currency(data) ]]) + Balance @@ -304,7 +258,7 @@ Incomes - Total Amount([[ get_currency(data) ]]) + Balance @@ -339,7 +293,7 @@ - Total:([[ get_currency(data) ]]) + Total: [[ formatLang(abs(sum_cr())) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/account_tax_code.rml b/addons/account/report/account_tax_code.rml index 9c495dd4834..82297022fb4 100644 --- a/addons/account/report/account_tax_code.rml +++ b/addons/account/report/account_tax_code.rml @@ -102,10 +102,10 @@ Entry Label - Debit([[ company.currency_id.name ]]) + Debit - Credit([[ company.currency_id.name ]]) + Credit diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index 741e4544e7b..6c3c6fc01c3 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -180,7 +180,7 @@ - [[ o.name or ' ' ]] + [[ o.name or ' ' ]] [[ formatLang(o.date_invoice,date=True) ]] @@ -211,7 +211,7 @@ Disc.(%) - Price([[ o.currency_id.code ]]) + Price @@ -229,7 +229,7 @@ [[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]] - [[ formatLang(l.price_unit) ]] + [[ formatLang(l.price_unit) ]][[ o.currency_id.symbol ]] [[ formatLang(l.discount) ]] @@ -338,10 +338,10 @@ [[ t.name ]] - [[ formatLang(t.base) ]] + [[ formatLang(t.base) ]] [[ o.currency_id.symbol ]] - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] + [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]] [[ o.currency_id.symbol ]] diff --git a/addons/account/report/overdue.rml b/addons/account/report/overdue.rml index fad5c27ec79..a0748e281ac 100644 --- a/addons/account/report/overdue.rml +++ b/addons/account/report/overdue.rml @@ -151,13 +151,13 @@ Maturity date - Due([[ company.currency_id.name ]]) + Due - Paid([[ company.currency_id.name ]]) + Paid - Maturity([[ company.currency_id.name ]]) + Maturity Li. @@ -181,10 +181,10 @@ [[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]] - [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] [[ company.currency_id.symbol ]] + [[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] - [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] [[ company.currency_id.symbol ]] + [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] [[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d'))) and formatLang(line['debit'] - line['credit']) ]] [[ company.currency_id.symbol ]] @@ -206,10 +206,10 @@ Sub-Total : - [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] - [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] [[ company.currency_id.symbol ]] + [[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account/report/tax_report.rml b/addons/account/report/tax_report.rml index 8650dcb0e48..9ad4ff56112 100644 --- a/addons/account/report/tax_report.rml +++ b/addons/account/report/tax_report.rml @@ -108,14 +108,14 @@ Tax Name - Debit([[ company.currency_id.code]]) - Credit([[ company.currency_id.code]]) - Tax Amount([[ company.currency_id.code]]) + Debit + Credit + Tax Amount [[ repeatIn(get_lines(data['form']['based_on'],data['form']['periods'],data['form']['company_id']), 'o') ]][[ (o['level']) ]] [[ (len(o['level'])<5 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ o['code'] ]] [[ o['name'] ]] - [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] [[ company.currency_id.symbol ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] [[ company.currency_id.symbol ]] - [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]] [[ company.currency_id.symbol ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]] [[ company.currency_id.symbol ]] + [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['debit']) ]] + [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['credit']) ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['credit'])]] [[ len(o['level'])<5 and setTag('para','para',{'fontName':"Helvetica-Bold"}) or removeParentNode('font')]][[ o['type']=='view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]][[ o['type']<>'view' and removeParentNode('font') ]][[ formatLang(o['tax_amount']) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account_analytic_plans/report/crossovered_analytic.rml b/addons/account_analytic_plans/report/crossovered_analytic.rml index 73b7192e27f..1abde7093b8 100644 --- a/addons/account_analytic_plans/report/crossovered_analytic.rml +++ b/addons/account_analytic_plans/report/crossovered_analytic.rml @@ -197,7 +197,7 @@ Quantity - Amount([[ company.currency_id.code]]) + Amount Percentage @@ -245,7 +245,7 @@ Quantity - Amount([[ company.currency_id.code]]) + Amount Percentage diff --git a/addons/account_budget/report/analytic_account_budget_report.rml b/addons/account_budget/report/analytic_account_budget_report.rml index 2cf00cb1bd5..e349b3d4920 100644 --- a/addons/account_budget/report/analytic_account_budget_report.rml +++ b/addons/account_budget/report/analytic_account_budget_report.rml @@ -128,13 +128,13 @@ Description - Theoretical Amount ([[ company.currency_id.code ]]) + Theoretical Amount - Planned Amount([[ company.currency_id.code ]]) + Planned Amount - Practical Amount([[ company.currency_id.code ]]) + Practical Amount Perc(%) diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml index f83bcf37e10..9ef3dc716af 100644 --- a/addons/account_budget/report/crossovered_budget_report.rml +++ b/addons/account_budget/report/crossovered_budget_report.rml @@ -127,13 +127,13 @@ Description - Theoretical Amount([[ company.currency_id.code]]) + Theoretical Amount - Planned Amount([[ company.currency_id.code]]) + Planned Amount - Practical Amount([[ company.currency_id.code]]) + Practical Amount Perc(%) @@ -165,7 +165,7 @@ - [[ repeatIn(funct_total(data['form']),'b') ]]Total ([[ company.currency_id.code]]) : + [[ repeatIn(funct_total(data['form']),'b') ]]Total: [[ formatLang(b['tot_theo']) ]] [[ company.currency_id.symbol ]] diff --git a/addons/account_followup/report/report_followp_print.rml b/addons/account_followup/report/report_followp_print.rml index e632569ea79..13230f246fd 100644 --- a/addons/account_followup/report/report_followp_print.rml +++ b/addons/account_followup/report/report_followp_print.rml @@ -142,13 +142,13 @@ Currency - Due([[ company.currency_id.code ]]) + Due - Paid([[ company.currency_id.code ]]) + Paid - Maturity([[ company.currency_id.code ]]) + Maturity Li. @@ -175,10 +175,10 @@ [[ formatLang(line['amount_currency'] )]] [[ line['amount_currency'] and line['currency_id'][1] or '' ]] - [[ formatLang(line['debit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['debit']) ]] - [[ formatLang(line['credit']) ]] [[ company.currency_id.symbol ]] + [[ formatLang(line['credit']) ]] [[ (line['date_maturity'] < time.strftime('%Y-%m-%d')) and formatLang(line['debit'] -line['credit']) or formatLang(0.0) ]] [[ company.currency_id.symbol ]] @@ -197,13 +197,13 @@ - Sub-Total([[ company.currency_id.code ]]): + Sub-Total: - [[formatLang(reduce(lambda x,y: x+y['debit'], getLines(o), 0.00)) ]] [[ company.currency_id.symbol ]] + [[formatLang(reduce(lambda x,y: x+y['debit'], getLines(o), 0.00)) ]] - [[formatLang(reduce(lambda x,y: x+y['credit'], getLines(o), 0.00)) ]] [[ company.currency_id.symbol ]] + [[formatLang(reduce(lambda x,y: x+y['credit'], getLines(o), 0.00)) ]]/para> [[ formatLang(reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)) ]] [[ company.currency_id.symbol ]] @@ -221,7 +221,7 @@ - Balance([[ company.currency_id.code ]]): + Balance: [[ formatLang((reduce(lambda x,y: x+(y['debit'] - y['credit']), getLines(o), 0.00))) ]] [[ company.currency_id.symbol]] diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 8f7d5f561e8..0e17cfeef68 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -260,7 +260,7 @@ Disc. (%) - Price([[ o.currency_id.code ]]) + Price @@ -360,7 +360,7 @@ Disc. (%) - Price([[ o.currency_id.code ]]) + Price diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index 8c3c05e2422..41775417161 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -264,7 +264,7 @@ Disc. (%) - Price([[ o.currency_id.code ]]) + Price @@ -364,7 +364,7 @@ Disc. (%) - Price([[ o.currency_id.code ]]) + Price diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 792897fb782..c8db1e37831 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -207,7 +207,7 @@ Value Date - Amount([[ get_company_currency() ]]) + Amount Currency @@ -250,7 +250,7 @@ - Total:([[ get_company_currency() ]]) + Total: [[ formatLang(get_amount_total(o)) or '' ]] [[get_company_currency_symbol()]] diff --git a/addons/account_reporting/report/account_report_bs.rml b/addons/account_reporting/report/account_report_bs.rml index c0fa4f1e2d2..62cf193e416 100644 --- a/addons/account_reporting/report/account_report_bs.rml +++ b/addons/account_reporting/report/account_report_bs.rml @@ -174,7 +174,7 @@ Account Name - Balance([[company.currency_id.code]]) + Balance diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 1a61355f382..a1fb726339e 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -18,15 +18,10 @@ # along with this program. If not, see . # ############################################################################## -from mx import DateTime from osv import fields, osv, orm -from tools import config from tools.translate import _ -import ir import netsvc -import os import time -import tools #---------------------------------------------------------- # Auction Artists @@ -70,29 +65,24 @@ class auction_dates(osv.osv): name = [(r['id'], '['+r['auction1']+'] '+ r['name']) for r in reads] return name - def _get_buyer_invoice(self, cr, uid, ids, name, arg, context={}): + def _get_invoice(self, cr, uid, ids, name, arg, context={}): lots_obj = self.pool.get('auction.lots') result = {} for data in self.browse(cr, uid, ids): - inv_ids = [] - lots_ids = lots_obj.search(cr, uid, [('auction_id','=',data.id),('ach_inv_id','!=',False)]) + buyer_inv_ids = [] + seller_inv_ids = [] + result[data.id] = { + 'seller_invoice_history': buyer_inv_ids, + 'buyer_invoice_history': seller_inv_ids, + } + lots_ids = lots_obj.search(cr, uid, [('auction_id','=',data.id)]) for lot in lots_obj.browse(cr, uid, lots_ids): if lot.ach_inv_id: - inv_ids.append(lot.ach_inv_id.id) - result[data.id] = inv_ids - return result - - def _get_seller_invoice(self, cr, uid, ids, name, arg, context={}): - lots_obj = self.pool.get('auction.lots') - lots_ids = lots_obj.search(cr, uid, [('auction_id','in',ids)]) - result = {} - for data in self.browse(cr, uid, ids): - inv_ids = [] - lots_ids = lots_obj.search(cr, uid, [('auction_id','=',data.id),('sel_inv_id','!=',False)]) - for lot in lots_obj.browse(cr, uid, lots_ids): + buyer_inv_ids.append(lot.ach_inv_id.id) if lot.sel_inv_id: - inv_ids.append(lot.sel_inv_id.id) - result[data.id] = inv_ids + seller_inv_ids.append(lot.sel_inv_id.id) + result[data.id]['seller_invoice_history'] = seller_inv_ids + result[data.id]['buyer_invoice_history'] = buyer_inv_ids return result _columns = { @@ -111,8 +101,8 @@ class auction_dates(osv.osv): 'state': fields.selection((('draft', 'Draft'), ('closed', 'Closed')), 'State', select=1, readonly=True, help='When auction starts the state is \'Draft\'.\n At the end of auction, the state becomes \'Closed\'.'), 'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True), - 'buyer_invoice_history': fields.function(_get_buyer_invoice, relation='account.invoice', method=True, string="Buyer Invoice", type='many2many'), - 'seller_invoice_history': fields.function(_get_seller_invoice, relation='account.invoice', method=True, string="Seller Invoice", type='many2many'), + 'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Buyer Invoice", type='many2many', multi=True), + 'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', method=True, string="Seller Invoice", type='many2many', multi=True), } _defaults = { @@ -134,9 +124,9 @@ class auction_dates(osv.osv): context={} lots_obj = self.pool.get('auction.lots') lots_ids = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('state', '=', 'draft'), ('obj_price', '>', 0)]) - new_buyer_invoice = lots_obj.lots_invoice(cr, uid, lots_ids, {}, None) + lots_obj.lots_invoice(cr, uid, lots_ids, {}, None) lots_ids2 = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('obj_price', '>', 0)]) - new_seller_invoice = lots_obj.seller_trans_create(cr, uid, lots_ids2, {}) + lots_obj.seller_trans_create(cr, uid, lots_ids2, {}) self.write(cr, uid, ids, {'state': 'closed'}) #close the auction return True @@ -289,7 +279,6 @@ class auction_lots(osv.osv): lots = self.browse(cr, uid, ids, context) pt_tax = self.pool.get('account.tax') for lot in lots: - total_tax = 0.0 taxes = [] for name in fields: res[lot.id] = {name: False} @@ -350,7 +339,6 @@ class auction_lots(osv.osv): ('account_id', '=', lot.auction_id.account_analytic_id.id), ('journal_id', '<>', lot.auction_id.journal_id.id), ('journal_id', '<>', lot.auction_id.journal_seller_id.id)]) - indir_cost = lot.bord_vnd_id.specific_cost_ids for r in lot.bord_vnd_id.specific_cost_ids: som += r.amount for line in account_analytic_line_obj.browse(cr, uid, line_ids, context=context): @@ -609,7 +597,6 @@ class auction_lots(osv.osv): raise orm.except_orm(_('Missed buyer !'), _('The object "%s" has no buyer assigned.') % (lot.name,)) else: partner_ref =lot.ach_uid.id - lot_name = lot.obj_num res = res_obj.address_get(cr, uid, [partner_ref], ['contact', 'invoice']) contact_addr_id = res['contact'] invoice_addr_id = res['invoice'] @@ -663,16 +650,12 @@ class auction_lots(osv.osv): inv_line_obj = self.pool.get('account.invoice.line') wf_service = netsvc.LocalService('workflow') for lot in self.browse(cr, uid, ids, context): - partner_id = lot.bord_vnd_id.partner_id.id if not lot.auction_id.id: continue - lot_name = lot.obj_num if lot.bord_vnd_id.id in invoices: inv_id = invoices[lot.bord_vnd_id.id] else: res = partner_obj.address_get(cr, uid, [lot.bord_vnd_id.partner_id.id], ['contact', 'invoice']) - contact_addr_id = res['contact'] - invoice_addr_id = res['invoice'] inv = { 'name': 'Auction:' +lot.name, 'journal_id': lot.auction_id.journal_seller_id.id, @@ -721,7 +704,6 @@ class auction_lots(osv.osv): RETURN: id of generated invoice """ - dt = time.strftime('%Y-%m-%d') inv_ref = self.pool.get('account.invoice') res_obj = self.pool.get('res.partner') inv_line_obj = self.pool.get('account.invoice.line') @@ -738,8 +720,6 @@ class auction_lots(osv.osv): add = res_obj.read(cr, uid, [lot.ach_uid.id], ['address'])[0]['address'] if not len(add): raise orm.except_orm(_('Missed Address !'), _('The Buyer has no Invoice Address.')) - price = lot.obj_price or 0.0 - lot_name =lot.obj_num inv = { 'name':lot.auction_id.name or '', 'reference': lot.ach_login, 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 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 diff --git a/addons/auction/wizard/auction_taken.py b/addons/auction/wizard/auction_taken.py index 7db905cd576..ff79000d898 100644 --- a/addons/auction/wizard/auction_taken.py +++ b/addons/auction/wizard/auction_taken.py @@ -19,12 +19,6 @@ # ############################################################################## from osv import fields, osv -from tools.translate import _ -import netsvc -import pooler -import time -import tools -import wizard class auction_taken(osv.osv_memory): """ diff --git a/addons/hr_payroll/report/report_payroll_advice.rml b/addons/hr_payroll/report/report_payroll_advice.rml index 88a5b85ca5f..ff793469284 100644 --- a/addons/hr_payroll/report/report_payroll_advice.rml +++ b/addons/hr_payroll/report/report_payroll_advice.rml @@ -120,16 +120,18 @@ [[repeatIn(objects,'o')]] - Payment Advice - - - + + + + + + @@ -174,7 +176,7 @@ - [[ o.name ]] for period [[ get_month(o.date)['mname'] ]] + Payment Advice: [[ o.name ]] for period [[ get_month(o.date)['mname'] ]] @@ -336,4 +338,4 @@ - \ No newline at end of file + diff --git a/addons/hr_payroll/report/report_year_report.rml b/addons/hr_payroll/report/report_year_report.rml index 77a6cdfa1fb..58448de5704 100755 --- a/addons/hr_payroll/report/report_year_report.rml +++ b/addons/hr_payroll/report/report_year_report.rml @@ -68,19 +68,19 @@ - + - - - - - - - - - - - + + + + + + + + + + + @@ -90,13 +90,13 @@ - - - - + + + + - - + + @@ -106,8 +106,8 @@ - - + + @@ -121,8 +121,8 @@ + - Yearly Salary Details For [[ get_fiscalyear(data['form']['fiscalyear_id']) ]] @@ -173,7 +173,7 @@ [[ m[11] ]] - Total + Total([[company.currency_id.code]]) @@ -188,43 +188,43 @@ [[ e[0] ]] - [[ formatLang(e[1]) ]] + [[ formatLang(e[1]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[2]) ]] + [[ formatLang(e[2]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[3]) ]] + [[ formatLang(e[3]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[4]) ]] + [[ formatLang(e[4]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[5]) ]] + [[ formatLang(e[5]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[6]) ]] + [[ formatLang(e[6]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[7]) ]] + [[ formatLang(e[7]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[8]) ]] + [[ formatLang(e[8]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[9]) ]] + [[ formatLang(e[9]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[10]) ]] + [[ formatLang(e[10]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[11]) ]] + [[ formatLang(e[11]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[12]) ]] + [[ formatLang(e[12]) ]] [[company.currency_id.symbol]] - [[ formatLang(e[13]) ]] + [[ formatLang(e[13]) ]] [[company.currency_id.symbol]] @@ -244,46 +244,46 @@ - Total + Total([[company.currency_id.code]]) - [[ formatLang(t[1]) ]] + [[ formatLang(t[1]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[2]) ]] + [[ formatLang(t[2]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[3]) ]] + [[ formatLang(t[3]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[4]) ]] + [[ formatLang(t[4]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[5]) ]] + [[ formatLang(t[5]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[6]) ]] + [[ formatLang(t[6]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[7]) ]] + [[ formatLang(t[7]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[8]) ]] + [[ formatLang(t[8]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[9]) ]] + [[ formatLang(t[9]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[10]) ]] + [[ formatLang(t[10]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[11]) ]] + [[ formatLang(t[11]) ]] [[company.currency_id.symbol]] - [[ formatLang(t[12]) ]] + [[ formatLang(t[12]) ]] [[company.currency_id.symbol]] - [[ formatLang(get_total()) ]] + [[ formatLang(get_total()) ]] [[company.currency_id.symbol]] diff --git a/addons/lunch/report/order.py b/addons/lunch/report/order.py index ff77e7fe6b8..838ab108c23 100644 --- a/addons/lunch/report/order.py +++ b/addons/lunch/report/order.py @@ -41,6 +41,6 @@ class order(report_sxw.rml_parse): }) report_sxw.report_sxw('report.lunch.order', 'lunch.order', - 'addons/lunch/report/order.rml',parser=order, header=False) + 'addons/lunch/report/order.rml',parser=order, header='external') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/lunch/report/order.rml b/addons/lunch/report/order.rml index 44773e22e96..e01e4df6d2e 100644 --- a/addons/lunch/report/order.rml +++ b/addons/lunch/report/order.rml @@ -10,123 +10,212 @@
- + - - - - - + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + - - Printed at : [[time.strftime("%Hh%M")]] - - + - - - - - - - Name - - - Order - - - Description - - - Unit Price - - -
- + [[repeatIn(objects,'o')]] + + + + + + + + + + + + + + [[ o.user_id.address_id.title or '' ]] [[ o.user_id.address_id.name ]] + [[ o.user_id.address_id.street ]] + [[ o.user_id.address_id.street2 or removeParentNode('para') ]] + [[ o.user_id.address_id.zip or '' ]] [[ o.user_id.address_id.city or '' ]] + [[ (o.user_id.address_id.state_id and o.user_id.address_id.state_id.name) or removeParentNode('para')]] [[ (o.user_id.address_id.country_id and o.user_id.address_id.country_id.name) or '' ]] + + + + + + + + + + + + + + Lunch Order + + + + + + + + + + + + + Name + + + Order + + + Description + + + Unit Price([[company.currency_id.code]]) + + +
- + - [[repeatIn(objects, 'o') ]] - [[ o.user_id.name ]] + [[repeatIn(objects, 'o') ]] + [[ o.user_id.name ]] - [[o.product.name ]] + [[o.product.name ]] - [[ o.descript ]] - - - + [[ o.descript ]] - [['%.2f' % o.price ]] - - - - - - - - - - - - - - - - - - - - [[ '%.2f' % sum_price(objects) ]] + [[formatLang(o.price) ]] [[company.currency_id.symbol]] - + + + + + + + + + + + + + + Total: + + + [[ formatLang(sum_price(objects)) ]] [[company.currency_id.symbol]] + + + +
- diff --git a/addons/mrp_repair/mrp_repair.py b/addons/mrp_repair/mrp_repair.py index 9c4a11cb9e0..4fadcdce471 100644 --- a/addons/mrp_repair/mrp_repair.py +++ b/addons/mrp_repair/mrp_repair.py @@ -272,7 +272,6 @@ class mrp_repair(osv.osv): @param product_id: Product id from current record. @return: Dictionary of values. """ - prodlot_obj = self.pool.get('stock.production.lot') move_obj = self.pool.get('stock.move') data = {} data['value'] = { @@ -503,7 +502,7 @@ class mrp_repair(osv.osv): return True def wkf_repair_done(self, cr, uid, ids, *args): - res = self.action_repair_done(cr, uid, ids) + self.action_repair_done(cr, uid, ids) return True def action_repair_done(self, cr, uid, ids, context=None): diff --git a/addons/mrp_repair/report/order.py b/addons/mrp_repair/report/order.py index 3257ba3df7a..3d6f9200dd8 100644 --- a/addons/mrp_repair/report/order.py +++ b/addons/mrp_repair/report/order.py @@ -21,8 +21,6 @@ import time from report import report_sxw -from osv import osv -import pooler class order(report_sxw.rml_parse): def __init__(self, cr, uid, name, context): 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 @@ -