From c771903c3baf11aef0b6d0b6b0bdf9fa870125d3 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Thu, 27 Mar 2014 19:25:20 +0100 Subject: [PATCH] [IMP] account* reports: removed rml, added qweb template, changed the wizard to return qweb actions bzr revid: sle@openerp.com-20140327182520-uu7ezsqic30x7mqo --- addons/account/__openerp__.py | 21 +- addons/account/account_invoice.py | 12 +- addons/account/account_report.xml | 187 ++++- addons/account/project/project_report.xml | 65 +- .../project/report/analytic_balance.rml | 234 ------ .../project/report/analytic_journal.rml | 346 --------- addons/account/project/report/cost_ledger.rml | 305 -------- .../report/inverted_analytic_balance.rml | 229 ------ .../project/report/quantity_cost_ledger.rml | 281 -------- .../project/views/report_analyticbalance.xml | 62 ++ .../views/report_analyticcostledger.xml | 90 +++ .../report_analyticcostledgerquantity.xml | 87 +++ .../project/views/report_analyticjournal.xml | 90 +++ .../views/report_invertedanalyticbalance.xml | 91 +++ .../wizard/account_analytic_balance_report.py | 20 +- ...analytic_cost_ledger_for_journal_report.py | 20 +- .../account_analytic_cost_ledger_report.py | 19 +- ...ccount_analytic_inverted_balance_report.py | 20 +- .../wizard/account_analytic_journal_report.py | 19 +- addons/account/report/__init__.py | 4 - .../report/account_aged_partner_balance.rml | 285 -------- addons/account/report/account_balance.rml | 313 --------- .../report/account_central_journal.rml | 338 --------- .../report/account_financial_report.rml | 303 -------- .../report/account_general_journal.rml | 387 ---------- .../account/report/account_general_ledger.rml | 619 ---------------- .../account_general_ledger_landscape.rml | 658 ----------------- addons/account/report/account_journal.rml | 311 -------- .../report/account_journal_sale_purchase.rml | 346 --------- .../report/account_partner_balance.rml | 257 ------- .../account/report/account_partner_ledger.rml | 658 ----------------- .../report/account_partner_ledger_other.rml | 665 ------------------ .../account/report/account_print_invoice.py | 37 - .../account/report/account_print_invoice.rml | 373 ---------- .../account/report/account_print_overdue.rml | 290 -------- .../views/report_agedpartnerbalance.xml | 133 ++++ .../account/views/report_centraljournal.xml | 93 +++ addons/account/views/report_financial.xml | 128 ++++ .../account/views/report_generaljournal.xml | 98 +++ addons/account/views/report_generalledger.xml | 133 ++++ addons/account/views/report_invoice.xml | 153 ++++ addons/account/views/report_journal.xml | 88 +++ addons/account/views/report_overdue.xml | 113 +++ .../account/views/report_partnerbalance.xml | 125 ++++ addons/account/views/report_partnerledger.xml | 131 ++++ .../views/report_partnerledgerother.xml | 131 ++++ .../views/report_salepurchasejournal.xml | 107 +++ addons/account/views/report_trialbalance.xml | 94 +++ .../wizard/account_financial_report.py | 12 +- .../wizard/account_report_account_balance.py | 3 +- .../account_report_aged_partner_balance.py | 8 +- .../wizard/account_report_central_journal.py | 9 +- .../wizard/account_report_general_journal.py | 5 +- .../wizard/account_report_general_ledger.py | 8 +- .../wizard/account_report_partner_balance.py | 9 +- .../wizard/account_report_partner_ledger.py | 19 +- .../wizard/account_report_print_journal.py | 10 +- addons/account/wizard/account_vat.py | 3 +- addons/account_analytic_plans/__openerp__.py | 4 +- .../account_analytic_plans_report.xml | 13 +- .../report/crossovered_analytic.rml | 304 -------- .../views/report_crossoveredanalyticplans.xml | 66 ++ .../wizard/account_crossovered_analytic.py | 7 +- .../__openerp__.py | 1 + .../account_bank_statement_report.xml | 23 +- .../report/bank_statement_balance_report.rml | 145 ---- .../views/report_bankstatementbalance.xml | 35 + addons/account_budget/__openerp__.py | 8 +- .../account_budget/account_budget_report.xml | 48 +- .../report/analytic_account_budget_report.rml | 226 ------ .../account_budget/report/budget_report.rml | 188 ----- .../report/crossovered_budget_report.rml | 203 ------ .../views/report_analyticaccountbudget.xml | 69 ++ addons/account_budget/views/report_budget.xml | 77 ++ .../views/report_crossoveredbudget.xml | 81 +++ .../wizard/account_budget_analytic.py | 21 +- .../account_budget_crossovered_report.py | 17 +- ...count_budget_crossovered_summary_report.py | 20 +- .../wizard/account_budget_report.py | 20 +- addons/account_check_writing/__openerp__.py | 4 +- .../account_check_writing_report.xml | 36 +- .../data/report_paperformat.xml | 20 + .../report/check_print_bottom.rml | 318 --------- .../report/check_print_middle.rml | 356 ---------- .../report/check_print_top.rml | 336 --------- .../views/report_check.xml | 48 ++ addons/account_followup/__openerp__.py | 3 +- addons/account_followup/account_followup.py | 17 +- .../account_followup_reports.xml | 14 + .../account_followup_view.xml | 1 - .../report/account_followup_print.rml | 238 ------- .../tests/test_account_followup.py | 4 +- .../views/report_followup.xml | 58 ++ addons/account_payment/__openerp__.py | 2 + .../account_payment_report.xml | 9 +- addons/account_payment/report/order.rml | 290 -------- .../views/report_paymentorder.xml | 104 +++ addons/account_test/__openerp__.py | 15 +- addons/account_test/account_test_report.xml | 21 +- addons/account_test/report/account_test.rml | 78 -- .../account_test/views/report_accounttest.xml | 23 + addons/account_voucher/__openerp__.py | 4 +- .../report/account_voucher.rml | 446 ------------ .../report/account_voucher_print.rml | 331 --------- addons/report/controllers/main.py | 9 +- addons/report/models/report.py | 26 +- addons/report/models/report_paperformat.py | 4 +- addons/report/views/layouts.xml | 6 +- addons/report_intrastat/__init__.py | 2 - addons/report_intrastat/__openerp__.py | 5 +- addons/report_intrastat/intrastat_report.xml | 20 +- addons/report_intrastat/report/__init__.py | 22 - addons/report_intrastat/report/invoice.py | 35 - addons/report_intrastat/report/invoice.rml | 401 ----------- .../views/report_intrastatinvoice.xml | 149 ++++ 115 files changed, 3172 insertions(+), 11514 deletions(-) delete mode 100644 addons/account/project/report/analytic_balance.rml delete mode 100644 addons/account/project/report/analytic_journal.rml delete mode 100644 addons/account/project/report/cost_ledger.rml delete mode 100644 addons/account/project/report/inverted_analytic_balance.rml delete mode 100644 addons/account/project/report/quantity_cost_ledger.rml create mode 100644 addons/account/project/views/report_analyticbalance.xml create mode 100644 addons/account/project/views/report_analyticcostledger.xml create mode 100644 addons/account/project/views/report_analyticcostledgerquantity.xml create mode 100644 addons/account/project/views/report_analyticjournal.xml create mode 100644 addons/account/project/views/report_invertedanalyticbalance.xml delete mode 100644 addons/account/report/account_aged_partner_balance.rml delete mode 100644 addons/account/report/account_balance.rml delete mode 100644 addons/account/report/account_central_journal.rml delete mode 100644 addons/account/report/account_financial_report.rml delete mode 100644 addons/account/report/account_general_journal.rml delete mode 100644 addons/account/report/account_general_ledger.rml delete mode 100644 addons/account/report/account_general_ledger_landscape.rml delete mode 100644 addons/account/report/account_journal.rml delete mode 100644 addons/account/report/account_journal_sale_purchase.rml delete mode 100644 addons/account/report/account_partner_balance.rml delete mode 100644 addons/account/report/account_partner_ledger.rml delete mode 100644 addons/account/report/account_partner_ledger_other.rml delete mode 100644 addons/account/report/account_print_invoice.py delete mode 100644 addons/account/report/account_print_invoice.rml delete mode 100644 addons/account/report/account_print_overdue.rml create mode 100644 addons/account/views/report_agedpartnerbalance.xml create mode 100644 addons/account/views/report_centraljournal.xml create mode 100644 addons/account/views/report_financial.xml create mode 100644 addons/account/views/report_generaljournal.xml create mode 100644 addons/account/views/report_generalledger.xml create mode 100644 addons/account/views/report_invoice.xml create mode 100644 addons/account/views/report_journal.xml create mode 100644 addons/account/views/report_overdue.xml create mode 100644 addons/account/views/report_partnerbalance.xml create mode 100644 addons/account/views/report_partnerledger.xml create mode 100644 addons/account/views/report_partnerledgerother.xml create mode 100644 addons/account/views/report_salepurchasejournal.xml create mode 100644 addons/account/views/report_trialbalance.xml delete mode 100644 addons/account_analytic_plans/report/crossovered_analytic.rml create mode 100644 addons/account_analytic_plans/views/report_crossoveredanalyticplans.xml delete mode 100644 addons/account_bank_statement_extensions/report/bank_statement_balance_report.rml create mode 100644 addons/account_bank_statement_extensions/views/report_bankstatementbalance.xml delete mode 100644 addons/account_budget/report/analytic_account_budget_report.rml delete mode 100644 addons/account_budget/report/budget_report.rml delete mode 100644 addons/account_budget/report/crossovered_budget_report.rml create mode 100644 addons/account_budget/views/report_analyticaccountbudget.xml create mode 100644 addons/account_budget/views/report_budget.xml create mode 100644 addons/account_budget/views/report_crossoveredbudget.xml create mode 100644 addons/account_check_writing/data/report_paperformat.xml delete mode 100644 addons/account_check_writing/report/check_print_bottom.rml delete mode 100644 addons/account_check_writing/report/check_print_middle.rml delete mode 100644 addons/account_check_writing/report/check_print_top.rml create mode 100644 addons/account_check_writing/views/report_check.xml create mode 100644 addons/account_followup/account_followup_reports.xml delete mode 100644 addons/account_followup/report/account_followup_print.rml create mode 100644 addons/account_followup/views/report_followup.xml delete mode 100644 addons/account_payment/report/order.rml create mode 100644 addons/account_payment/views/report_paymentorder.xml delete mode 100644 addons/account_test/report/account_test.rml create mode 100644 addons/account_test/views/report_accounttest.xml delete mode 100644 addons/account_voucher/report/account_voucher.rml delete mode 100644 addons/account_voucher/report/account_voucher_print.rml delete mode 100644 addons/report_intrastat/report/__init__.py delete mode 100644 addons/report_intrastat/report/invoice.py delete mode 100644 addons/report_intrastat/report/invoice.rml create mode 100644 addons/report_intrastat/views/report_intrastatinvoice.xml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 95ecdc8c35a..83434893ac7 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -126,6 +126,24 @@ for a particular financial year and for preparation of vouchers there is a modul 'account_pre_install.yml', 'views/report_vat.xml', + 'views/report_invoice.xml', + 'views/report_trialbalance.xml', + 'views/report_centraljournal.xml', + 'views/report_overdue.xml', + 'views/report_generaljournal.xml', + 'views/report_journal.xml', + 'views/report_salepurchasejournal.xml', + 'views/report_partnerbalance.xml', + 'views/report_agedpartnerbalance.xml', + 'views/report_partnerledger.xml', + 'views/report_partnerledgerother.xml', + 'views/report_financial.xml', + 'views/report_generalledger.xml', + 'project/views/report_analyticbalance.xml', + 'project/views/report_analyticjournal.xml', + 'project/views/report_analyticcostledgerquantity.xml', + 'project/views/report_analyticcostledger.xml', + 'project/views/report_invertedanalyticbalance.xml', ], 'js': [ 'static/src/js/account_move_reconciliation.js', @@ -157,8 +175,6 @@ for a particular financial year and for preparation of vouchers there is a modul 'test/account_period_close.yml', 'test/account_use_model.yml', 'test/account_validate_account_move.yml', - #'test/account_bank_statement.yml', - #'test/account_cash_statement.yml', 'test/test_edi_invoice.yml', 'test/account_report.yml', 'test/account_fiscalyear_close.yml', #last test, as it will definitively close the demo fiscalyear @@ -166,4 +182,5 @@ for a particular financial year and for preparation of vouchers there is a modul 'installable': True, 'auto_install': False, } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 06e59232ac9..5f7c2b66400 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -409,17 +409,7 @@ class account_invoice(osv.osv): ''' assert len(ids) == 1, 'This option should only be used for a single id at a time.' self.write(cr, uid, ids, {'sent': True}, context=context) - datas = { - 'ids': ids, - 'model': 'account.invoice', - 'form': self.read(cr, uid, ids[0], context=context) - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.invoice', - 'datas': datas, - 'nodestroy' : True - } + return self.pool['report'].get_action(cr, uid, ids, 'account.report_invoice', context=context) def action_invoice_sent(self, cr, uid, ids, context=None): ''' diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 4f9ad1b5c56..90d2c1637fb 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -1,45 +1,168 @@ - - - - - - - - - - - + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + parent="account.menu_finance_generic_reporting" + sequence="3" + /> diff --git a/addons/account/project/project_report.xml b/addons/account/project/project_report.xml index 3ee449e01b5..de2e2feee5a 100644 --- a/addons/account/project/project_report.xml +++ b/addons/account/project/project_report.xml @@ -1,29 +1,54 @@ - + - + - + - - - + + diff --git a/addons/account/project/report/analytic_balance.rml b/addons/account/project/report/analytic_balance.rml deleted file mode 100644 index 1754988f7d6..00000000000 --- a/addons/account/project/report/analytic_balance.rml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - Account Name - - - Debit - - - Credit - - - Balance - - - Quantity - - - - - - - - - Analytic Balance - [[ company.currency_id.name ]] - - - - - - - - - - Code - - - Account Name - - - Debit - - - Credit - - - Balance - - - Quantity - - - - - - - Total - - - - - - - - [[ 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')) ]] - - - [[ formatLang(sum_balance(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] - - - [[ formatLang(sum_all(get_objects(data['form']['empty_acc']),data['form']['date1'],data['form']['date2'],'quantity')) ]] - - - -
- [[ repeatIn(get_objects(data['form']['empty_acc']),'o') ]] - - - - [[ o['code'] ]] - - - [[ o['complete_name'] ]] - - - [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'debit')) ]] - - - [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'credit')) ]] - - - [[ formatLang(move_sum_balance(o['id'],data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] - - - [[ formatLang(move_sum(o['id'],data['form']['date1'],data['form']['date2'],'quantity')) ]] - - - -
- [[ repeatIn(lines_g(o['id'],data['form']['date1'],data['form']['date2']),'move_g') ]] - - - - [[ move_g['code'] ]] - - - [[ move_g['name'] ]] - - - [[ formatLang(move_g['debit'])]] - - - [[ formatLang(move_g['credit']) ]] - - - [[ formatLang(move_g['balance'], currency_obj = company.currency_id) ]] - - - [[ formatLang(move_g['quantity']) ]] - - - - - - -
-
- - - - - - -
-
-
\ No newline at end of file diff --git a/addons/account/project/report/analytic_journal.rml b/addons/account/project/report/analytic_journal.rml deleted file mode 100644 index 719851252b5..00000000000 --- a/addons/account/project/report/analytic_journal.rml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] - - - - Analytic Journal - - - - - - - Period from - - - Period to - - - Currency - - - - - - - [[ formatLang(data['form']['date1'],date=True) ]] - - - [[ formatLang(data['form']['date2'],date=True) ]] - - - [[ company.currency_id.name ]] - - - - - - - - - - Date - - - Code - - - Move Name - - - Account n° - - - General - - - Analytic - - - - - - - - - - [[ o.code ]] - [[ o.name ]] - - - - - - - - - - - - - - - - - - [[ formatLang(sum_general(o.id,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang(sum_analytic(o.id,data['form']['date1'],data['form']['date2'])) ]] - - - - - - -
- [[ repeatIn(lines(o.id,data['form']['date1'],data['form']['date2']), 'move') ]] - - - - - - - - - - - - - - [[ move.name ]] KI - - - [[ move.account_id.code ]] [[ move.account_id.name ]] - - - [[ formatLang(move.debit-move.credit) ]] - - - - - - - - - - - -
- [[ repeatIn(lines_a(move.id,o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] - - - - [[ (not move_a) and removeParentNode('blockTable') ]] [[ formatLang(move_a.date,date = True) ]] - - - [[ move_a.code ]] - - - [[ move_a.name ]] - - - [[ move_a.account_id.code ]] - [[ move_a.account_id.name ]] - - - - - - - - [[ formatLang( move_a.amount) ]] - - - - - - -
- - - - - - -
- - - -
- [[ repeatIn(lines_a(False,o.id,data['form']['date1'],data['form']['date2']),'move_a') ]] - - - - [[ (not move_a) and removeParentNode('blockTable') ]] [[ formatLang(move_a.date,date = True) ]] - - - [[ move_a.code ]] - - - [[ move_a.name ]] - - - [[ move_a.account_id.code ]] - [[ move_a.account_id.name ]] - - - - - - - - [[ formatLang( move_a.amount) ]] - - - - - - -
- - - -
-
diff --git a/addons/account/project/report/cost_ledger.rml b/addons/account/project/report/cost_ledger.rml deleted file mode 100644 index 1099a8b8b4e..00000000000 --- a/addons/account/project/report/cost_ledger.rml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date/Code - - - J.C. /Move name - - - Debit - - - Credit - - - Balance - - - - - - - - - - - - - Cost Ledger - - - - - - - - - - - - Period from - - - Period to - - - Printing date - - - - - - - [[ formatLang(data['form']['date1'],date = True) ]] - - - [[ formatLang(data['form']['date2'],date = True) ]] - - - [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] - - - - - - - - - - Date/Code - - - J.C. /Move name - - - Debit - - - Credit - - - Balance - - - - - - - Total: - - - - - - - - [[ formatLang (sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang (sum_credit(objects,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang (sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] - - - -
- [[ repeatIn(objects,'account') ]] - - - - [[ account.code ]] - - - [[ account.complete_name ]] - - - [[ formatLang (account_sum_debit(account,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang (account_sum_credit(account,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang (account_sum_balance(account,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id) ]] - - - -
- [[ repeatIn(lines_g(account,data['form']['date1'],data['form']['date2']),'move_g') ]] - - - - [[ move_g['code'] ]] - - - [[ move_g['name'] ]] - - - [[ formatLang( move_g['debit']) ]] - - - [[ formatLang( move_g['credit']) ]] - - - [[ formatLang( move_g['balance'], currency_obj = company.currency_id) ]] - - - -
- [[ repeatIn(lines_a(move_g,account,data['form']['date1'],data['form']['date2']),'move_a') ]] - - - - [[ formatLang(move_a['date'],date = True) ]] - - - [[ move_a['cj'] ]] - - - [[ move_a['name'] ]] - - - [[ formatLang( move_a['debit'] )]] - - - [[ formatLang( move_a['credit']) ]] - - - [[ formatLang( move_a['balance'], currency_obj = company.currency_id)]] - - - - - - -
-
-
-
-
-
diff --git a/addons/account/project/report/inverted_analytic_balance.rml b/addons/account/project/report/inverted_analytic_balance.rml deleted file mode 100644 index 54b6878c407..00000000000 --- a/addons/account/project/report/inverted_analytic_balance.rml +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - Name - - - Debit - - - Credit - - - Balance - - - Quantity - - - - - - - - Inverted Analytic Balance - [[ company.currency_id.name ]] - - - - - - - - - - Code - - - Name - - - Debit - - - Credit - - - Balance - - - Quantity - - - - - - - - - - Total - - - - - - - - [[ formatLang(sum_debit(objects,data['form']['date1'],data['form']['date2'])) ]] - - - [[ formatLang(sum_credit(objects,data['form']['date1'],data['form']['date2']))]] - - - [[ formatLang(sum_balance(objects,data['form']['date1'],data['form']['date2']), currency_obj = company.currency_id)]] - - - [[ formatLang(sum_quantity(objects,data['form']['date1'],data['form']['date2'])) ]] - - - -
- [[ repeatIn(lines_g(objects,data['form']['date1'],data['form']['date2']),'move_g') ]] - - - - [[ (not move_g) and removeParentNode('blockTable') ]] [[ move_g['code'] ]] - - - [[ move_g['name'] ]] - - - [[ formatLang(move_g['debit'])]] - - - [[formatLang(move_g['credit'])]] - - - [[ formatLang(move_g['balance'], currency_obj = company.currency_id)]] - - - [[formatLang(move_g['quantity']) ]] - - - -
- [[ repeatIn(lines_a(objects,move_g['id'],data['form']['date1'],data['form']['date2']),'move_a') ]] - - - - [[ (not move_a) and removeParentNode('blockTable') ]] [[ move_a['code'] ]] - - - [[ move_a['complete_name'] ]] - - - [[ formatLang(move_a['debit']) ]] - - - [[ formatLang(move_a['credit']) ]] - - - [[ formatLang(move_a['balance'], currency_obj = company.currency_id)]] - - - [[ formatLang(move_a['quantity']) ]] - - - - - - -
-
-
-
-
\ No newline at end of file diff --git a/addons/account/project/report/quantity_cost_ledger.rml b/addons/account/project/report/quantity_cost_ledger.rml deleted file mode 100644 index 9f99f50ccc2..00000000000 --- a/addons/account/project/report/quantity_cost_ledger.rml +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code/Date - - - J.C./Move name - - - Quantity - - - Total - - - - - - - - - - - - - Cost Ledger - - - - - - - - - - - - Period from - - - Period to - - - Printing date - - - - - - - [[ formatLang(data['form']['date1'],date = True) ]] - - - [[ formatLang(data['form']['date2'],date = True) ]] - - - [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] - - - - - - - - - - - - - Code/Date - - - J.C./Move name - - - Quantity - - - Total - - - - - - - Total: - - - - - - - - - - - - - [[ formatLang (sum_quantity(objects,data['form']['date1'],data['form']['date2'], data['form']['journal']) ) ]] - - - -
- [[ repeatIn(objects,'o') ]] - - - - [[ o.code ]] - - - [[ o.complete_name ]] - - - Max Qty: [[ formatLang (o.quantity_max )]] - - - [[ formatLang (account_sum_quantity(o.id,data['form']['date1'],data['form']['date2'], data['form']['journal']) )]] - - - -
- [[ repeatIn(lines_g(o.id,data['form']['date1'],data['form']['date2'],data['form']['journal']),'move_g') ]] - - - - [[ move_g['code'] ]] - - - [[ move_g['name'] ]] - - - [[ formatLang (move_g['quantity']) ]] - - - - - - - [[ repeatIn(lines_a(move_g['id'],o.id,data['form']['date1'],data['form']['date2'],data['form']['journal']),'move_a') ]] - [[ formatLang(move_a['date'],date = True) ]] - - - [[ move_a['cj'] ]] - - - [[ move_a['name'] ]] - - - [[ formatLang (move_a['quantity'] )]] - - - - - - -
-
-
-
-
\ No newline at end of file diff --git a/addons/account/project/views/report_analyticbalance.xml b/addons/account/project/views/report_analyticbalance.xml new file mode 100644 index 00000000000..96f692eda3d --- /dev/null +++ b/addons/account/project/views/report_analyticbalance.xml @@ -0,0 +1,62 @@ + + + + + + diff --git a/addons/account/project/views/report_analyticcostledger.xml b/addons/account/project/views/report_analyticcostledger.xml new file mode 100644 index 00000000000..fd99c637411 --- /dev/null +++ b/addons/account/project/views/report_analyticcostledger.xml @@ -0,0 +1,90 @@ + + + + + + \ No newline at end of file diff --git a/addons/account/project/views/report_analyticcostledgerquantity.xml b/addons/account/project/views/report_analyticcostledgerquantity.xml new file mode 100644 index 00000000000..1098a7627f3 --- /dev/null +++ b/addons/account/project/views/report_analyticcostledgerquantity.xml @@ -0,0 +1,87 @@ + + + + + + \ No newline at end of file diff --git a/addons/account/project/views/report_analyticjournal.xml b/addons/account/project/views/report_analyticjournal.xml new file mode 100644 index 00000000000..ce2f216e419 --- /dev/null +++ b/addons/account/project/views/report_analyticjournal.xml @@ -0,0 +1,90 @@ + + + + + + diff --git a/addons/account/project/views/report_invertedanalyticbalance.xml b/addons/account/project/views/report_invertedanalyticbalance.xml new file mode 100644 index 00000000000..7ed8f4f84f3 --- /dev/null +++ b/addons/account/project/views/report_invertedanalyticbalance.xml @@ -0,0 +1,91 @@ + + + + + + diff --git a/addons/account/project/wizard/account_analytic_balance_report.py b/addons/account/project/wizard/account_analytic_balance_report.py index 02b2eb6e95d..3a3c301cffc 100644 --- a/addons/account/project/wizard/account_analytic_balance_report.py +++ b/addons/account/project/wizard/account_analytic_balance_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_analytic_balance(osv.osv_memory): _name = 'account.analytic.balance' _description = 'Account Analytic Balance' @@ -42,16 +43,13 @@ class account_analytic_balance(osv.osv_memory): context = {} data = self.read(cr, uid, ids)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.analytic.account', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.balance', - 'datas': datas, - } + 'ids': context.get('active_ids', []), + 'model': 'account.analytic.account', + 'form': data + } + datas['form']['active_ids'] = context.get('active_ids', False) + + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticbalance', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py index 814cbb8cacc..b3c2d1bec12 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py +++ b/addons/account/project/wizard/account_analytic_cost_ledger_for_journal_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_analytic_cost_ledger_journal_report(osv.osv_memory): _name = 'account.analytic.cost.ledger.journal.report' _description = 'Account Analytic Cost Ledger For Journal Report' @@ -42,14 +43,13 @@ class account_analytic_cost_ledger_journal_report(osv.osv_memory): context = {} data = self.read(cr, uid, ids)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.analytic.account', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.quantity_cost_ledger', - 'datas': datas, - } + 'ids': context.get('active_ids', []), + 'model': 'account.analytic.account', + 'form': data + } + + datas['form']['active_ids'] = context.get('active_ids', False) + + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledgerquantity', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/account_analytic_cost_ledger_report.py b/addons/account/project/wizard/account_analytic_cost_ledger_report.py index ffd56352382..5f00c3c9ac5 100644 --- a/addons/account/project/wizard/account_analytic_cost_ledger_report.py +++ b/addons/account/project/wizard/account_analytic_cost_ledger_report.py @@ -20,9 +20,9 @@ ############################################################################## import time - from openerp.osv import osv, fields + class account_analytic_cost_ledger(osv.osv_memory): _name = 'account.analytic.cost.ledger' _description = 'Account Analytic Cost Ledger' @@ -42,14 +42,13 @@ class account_analytic_cost_ledger(osv.osv_memory): context = {} data = self.read(cr, uid, ids)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.analytic.account', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.cost_ledger', - 'datas': datas, - } + 'ids': context.get('active_ids',[]), + 'model': 'account.analytic.account', + 'form': data + } + + datas['form']['active_ids'] = context.get('active_ids', False) + + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledger', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/account_analytic_inverted_balance_report.py b/addons/account/project/wizard/account_analytic_inverted_balance_report.py index 9e54f4f848d..3b03ad2da56 100644 --- a/addons/account/project/wizard/account_analytic_inverted_balance_report.py +++ b/addons/account/project/wizard/account_analytic_inverted_balance_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_analytic_inverted_balance(osv.osv_memory): _name = 'account.analytic.inverted.balance' _description = 'Account Analytic Inverted Balance' @@ -41,14 +42,13 @@ class account_analytic_inverted_balance(osv.osv_memory): context = {} data = self.read(cr, uid, ids)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.analytic.account', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.inverted.balance', - 'datas': datas, - } + 'ids': context.get('active_ids', []), + 'model': 'account.analytic.account', + 'form': data + } + + datas['form']['active_ids'] = context.get('active_ids', False) + + return self.pool['report'].get_action(cr, uid, ids, 'account.report_invertedanalyticbalance', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/account_analytic_journal_report.py b/addons/account/project/wizard/account_analytic_journal_report.py index 61fe2cd318a..ab7e553435d 100644 --- a/addons/account/project/wizard/account_analytic_journal_report.py +++ b/addons/account/project/wizard/account_analytic_journal_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_analytic_journal_report(osv.osv_memory): _name = 'account.analytic.journal.report' _description = 'Account Analytic Journal' @@ -49,16 +50,12 @@ class account_analytic_journal_report(osv.osv_memory): for analytic_record in record.analytic_account_journal_id: ids_list.append(analytic_record.id) datas = { - 'ids': ids_list, - 'model': 'account.analytic.journal', - 'form': data - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.journal', - 'datas': datas, - } - + 'ids': ids_list, + 'model': 'account.analytic.journal', + 'form': data + } + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticjournal', data=datas, context=context) + def default_get(self, cr, uid, fields, context=None): if context is None: context = {} diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py index 544aa9e262e..ed8cc0aa8b3 100644 --- a/addons/account/report/__init__.py +++ b/addons/account/report/__init__.py @@ -26,12 +26,8 @@ import account_balance import account_partner_balance import account_general_ledger import account_partner_ledger -#import invoice -import account_print_invoice -#import overdue import account_print_overdue import account_aged_partner_balance -#import tax_report import report_vat import account_invoice_report import account_report diff --git a/addons/account/report/account_aged_partner_balance.rml b/addons/account/report/account_aged_partner_balance.rml deleted file mode 100644 index 5b5404e9c86..00000000000 --- a/addons/account/report/account_aged_partner_balance.rml +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Aged Trial Balance - - - - - - - Chart of Accounts - - - Fiscal Year - - - Start Date - - - Period Length(days) - - - Partner's - - - Analysis Direction - - - Target Moves - - - - - [[ get_account(data) or '' ]] - - - [[ get_fiscalyear(data) or '' ]] - - - [[ formatLang(data['form']['date_from'],date=True) ]] - - - [[ data['form']['period_length'] ]] - - - Receivable Accounts[[ data['form']['result_selection'] == 'customer' or removeParentNode('para') ]] - Payable Accounts[[ data['form']['result_selection'] == 'supplier' or removeParentNode('para') ]] - Receivable and Payable Accounts[[ data['form']['result_selection'] == 'customer_supplier' or removeParentNode('para') ]] - - - [[ data['form']['direction_selection'] ]] - - - [[ get_target_move(data) ]] - - - - - - - - - - Partners - - - Due[[ data['form']['direction_selection'] == 'future' and ' ' or removeParentNode('para') ]] - Not due[[ data['form']['direction_selection'] != 'future' and ' ' or removeParentNode('para') ]] - - - [[ data['form']['4']['name'] ]] - - - [[ data['form']['3']['name'] ]] - - - [[ data['form']['2']['name'] ]] - - - [[ data['form']['1']['name'] ]] - - - [[ data['form']['0']['name'] ]] - - - Total - - - - - - - [[ (get_lines(data['form']), 'partner') == False or removeParentNode('para') ]] - [[ (get_lines_with_out_partner(data['form']), 'not_partner') == False or removeParentNode('para') ]] - Account Total - - - [[ formatLang(get_direction('6'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_for_period('4'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_for_period('3'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_for_period('2'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_for_period('1'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_for_period('0'), currency_obj=company.currency_id) ]] - - - [[ formatLang(get_total('5'), currency_obj=company.currency_id) ]] - - - - - - [[ repeatIn(get_lines(data['form']), 'partner') ]] - [[ partner['name'] ]] - - - [[ formatLang(partner['direction'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['4'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['3'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['2'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['1'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['0'], currency_obj=company.currency_id) ]] - - - [[ formatLang(partner['total'], currency_obj=company.currency_id) ]] - - - - - [[ repeatIn(get_lines_with_out_partner(data['form']), 'not_partner') ]] - [[ not_partner['name'] ]] - - - [[ formatLang(not_partner['direction'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['4'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['3'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['2'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['1'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['0'], currency_obj=company.currency_id) ]] - - - [[ formatLang(not_partner['total'], currency_obj=company.currency_id) ]] - - - - - - - - - - diff --git a/addons/account/report/account_balance.rml b/addons/account/report/account_balance.rml deleted file mode 100644 index 08c05c65fa8..00000000000 --- a/addons/account/report/account_balance.rml +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Trial Balance - - - - - - - - - - - - - Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]] - Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] - - - Fiscal Year - - - Display Account - - - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - - - Target Moves - - - - - [[ get_account(data) or '' ]] - - - [[ get_fiscalyear(data) or '' ]] - - - All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]] - With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]] - With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]] - - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - Start Date - - - End Date - - - - - [[ formatLang(get_start_date(data),date=True) ]] - - - [[ formatLang(get_end_date(data),date=True) ]] - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - Start Period - - - End Period - - - - - [[ get_start_period(data) or removeParentNode('para') ]] - - - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - - [[ get_target_move(data) ]] - - - - - - - - - - - - Code - Account - 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']) ]][[ 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'], currency_obj=company.currency_id) ]][[ a['type']<>'view' and removeParentNode('font') ]] [[ formatLang(a['balance'], currency_obj=company.currency_id) ]] - - - - - - - diff --git a/addons/account/report/account_central_journal.rml b/addons/account/report/account_central_journal.rml deleted file mode 100644 index 6d350b5fe8f..00000000000 --- a/addons/account/report/account_central_journal.rml +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - - Centralized Journal - - - - - - Chart of Accounts - Fiscal Year - Journal - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[o.journal_id.name ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ get_target_move(data) ]] - - - - - - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - A/C No. - Account Name - Debit - Credit - Balance - - - [[ display_currency(data) or removeParentNode('blockTable') ]] - - A/C No. - Account Name - Debit - Credit - Balance - Currency - - - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - Total: - - [[ 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), currency_obj=company.currency_id ) ]] - - - [[ display_currency(data) or removeParentNode('blockTable') ]] - - Total: - - [[ 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), currency_obj=company.currency_id ) ]] - - - -
- [[ repeatIn(lines(o.period_id.id,o.journal_id.id),'line') ]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - [[ line['code'] ]] - [[ line['name'] ]] - [[ formatLang(line['debit']) ]] - [[ formatLang(line['credit'])]] - [[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]] - - - [[ display_currency(data) or removeParentNode('blockTable') ]] - - [[ line['code'] ]] - [[ line['name'] ]] - [[ formatLang(line['debit']) ]] - [[ formatLang(line['credit'])]] - [[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]] - [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] - - -
- -
-
diff --git a/addons/account/report/account_financial_report.rml b/addons/account/report/account_financial_report.rml deleted file mode 100644 index 7949077e43f..00000000000 --- a/addons/account/report/account_financial_report.rml +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ data['form']['account_report_id'][1] ]] - - - - - - - - - - Chart of Accounts - Fiscal Year - Filter By [[ get_filter(data)!='No Filters' and get_filter(data) ]] - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[ get_filter(data)=='No Filters' and get_filter(data) or removeParentNode('para') ]] - [[ get_filter(data)=='Date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - [[ get_target_move(data) ]] - - - - - - - - - - - - - [[ data['form']['debit_credit'] == 1 or removeParentNode('blockTable') ]] - - - Name - - - Debit - - - Credit - - - Balance - - - - [[ repeatIn(get_lines(data), 'a') ]] - [[ (a.get('level') <> 0) or removeParentNode('tr') ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,'level' in a and a.get('level') or 1))}) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_name'}) ]][[ a.get('name') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('debit',0.0), currency_obj = company.currency_id) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('credit',0.0), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') =='view' and a.get('level') <> 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') <>'view' or a.get('level') == 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - - - - - - [[ (not data['form']['enable_filter'] and not data['form']['debit_credit']) or removeParentNode('blockTable') ]] - - - Name - - - Balance - - - - [[ repeatIn(get_lines(data), 'a') ]] - [[ (a.get('level') <> 0) or removeParentNode('tr') ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,'level' in a and a.get('level') or 1))}) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_name'}) ]][[ a.get('name') ]] - [[ (a.get('account_type') =='view' and a.get('level') <> 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') <>'view' or a.get('level') == 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - - - - - - - - - [[ (data['form']['enable_filter'] == 1 and not data['form']['debit_credit']) or removeParentNode('blockTable') ]] - - - Name - - - Balance - - - [[ data['form']['label_filter'] ]] - - - - [[ repeatIn(get_lines(data), 'a') ]] - [[ (a.get('level') <> 0) or removeParentNode('tr') ]] - [[ setTag('tr','tr',{'style': 'Table'+str(min(3,'level' in a and a.get('level') or 1))}) ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_name'}) ]][[ a.get('name') ]] - [[ (a.get('account_type') =='view' and a.get('level') <> 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') <>'view' or a.get('level') == 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance'), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') =='view' and a.get('level') <> 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) ]] - [[ (a.get('account_type') <>'view' or a.get('level') == 1) or removeParentNode('td') ]] - [[ setTag('para','para',{'style': 'terp_level_'+str(min(6,a.get('level')))+'_balance'}) ]][[ formatLang(a.get('balance_cmp'), currency_obj = company.currency_id) ]] - - - - - - - diff --git a/addons/account/report/account_general_journal.rml b/addons/account/report/account_general_journal.rml deleted file mode 100644 index dce30e59918..00000000000 --- a/addons/account/report/account_general_journal.rml +++ /dev/null @@ -1,387 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn( periods(objects), 'o') ]] - - - - - - - - - - General Journal - - - - - - - - - - - Company[[ data['model']=='account.journal.period' and ' ' or removeParentNode('para') ]] - Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] - Fiscal Year - Journals - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True)]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ get_target_move(data) ]] - - - - - - - [[ display_currency(data)==False or removeParentNode('blockTable') ]] - - Code - Journal Name - Debit - Credit - Balance - - - Total: - - [[ formatLang(sum_debit()) ]] - [[ formatLang( sum_credit()) ]] - [[ formatLang( sum_debit()- sum_credit(), currency_obj=company.currency_id) ]] - - - [[ display_currency(data) or removeParentNode('blockTable') ]] - - Code - Journal Name - Debit - Credit - Balance - Currency - - - Total: - - [[ formatLang(sum_debit()) ]] - [[ formatLang( sum_credit()) ]] - [[ formatLang( sum_credit()- sum_debit(), currency_obj=company.currency_id) ]] - - - -
- [[ display_currency(data) or removeParentNode('blockTable') ]] - - - [[ o.name ]] : - - - - - - - [[ formatLang(sum_debit_period(o.id)) ]] - - - [[ formatLang(sum_credit_period(o.id)) ]] - - - [[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id), currency_obj=company.currency_id) ]] - - - - - - - - - - [[ display_currency(data)==False or removeParentNode('blockTable') ]] - - - [[ o.name ]] : - - - - - - - [[ formatLang(sum_debit_period(o.id)) ]] - - - [[ formatLang(sum_credit_period(o.id)) ]] - - - [[ formatLang(sum_credit_period(o.id)-sum_debit_period(o.id), currency_obj=company.currency_id) ]] - - - -
- [[ repeatIn(lines(o.id),'line')]] - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - - [[ line['code'] ]] - - - [[ line['name'] ]] - - - [[ formatLang(line['debit'] )]] - - - [[ formatLang(line['credit']) ]] - - - [[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]] - - - -
-
- [[ repeatIn(lines(o.id),'line')]] - [[ display_currency(data) or removeParentNode('blockTable') ]] - - [[ line['code'] ]] - [[ line['name'] ]] - [[ formatLang(line['debit'] )]] - [[ formatLang(line['credit']) ]] - [[ formatLang(line['credit']-line['debit'], currency_obj=company.currency_id ) ]] - [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] - - -
- - - -
- - - -
-
diff --git a/addons/account/report/account_general_ledger.rml b/addons/account/report/account_general_ledger.rml deleted file mode 100644 index 6897e15078d..00000000000 --- a/addons/account/report/account_general_ledger.rml +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - Date - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - Currency - - - - - [[ repeatIn(objects, 'a') ]] - General Ledger - - - - - - - Chart of Accounts - - - Fiscal Year - - - Journals - - - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - - - Target Moves - - - - - - - [[ get_account(data) or '' ]] - - - [[ get_fiscalyear(data) or '' ]] - - - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - - - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - Start Date - - - End Date - - - - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - [[ formatLang(get_start_date(data),date=True) ]] - - - [[ formatLang(get_end_date(data),date=True) ]] - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - Start Period - - - End Period - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - [[ get_start_period(data) or removeParentNode('para') ]] - - - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - - - - - [[ get_target_move(data) ]] - - - - - - - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - Date - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - Currency - - - -
- [[ repeatIn(get_children_accounts(a), 'o') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - - - [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] - - - [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]] - - - -
- [[ repeatIn(lines(o), 'line') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - [[ formatLang(line['ldate'],date=True) ]] - - - [[ line['lcode'] ]] - - - [[ strip_name(line['partner_name'],10) ]] - - - [[ line['lref'] and strip_name(line['lref'],9) ]] - - - [[ strip_name(line['move'],9) ]] - - - [[ strip_name(line['lname'],10) ]] - - - [[ strip_name(line['line_corresp'].replace(', ',','),10) ]] - - - [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] - - - [[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']] - - - -
-
- [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - -
- [[ repeatIn(get_children_accounts(a), 'o') ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - - - [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] - - - -
- [[ repeatIn(lines(o), 'line') ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - [[ formatLang(line['ldate'],date=True) ]] - - - [[ line['lcode'] ]] - - - [[ strip_name(line['partner_name'],20) ]] - - - [[ line['lref'] and strip_name(line['lref'],9) ]] - - - [[ strip_name(line['move'],9) ]] - - - [[ strip_name(line['lname'],18) ]] - - - [[ strip_name(line['line_corresp'].replace(', ',','),20) ]] - - - [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] - - - -
-
-
-
-
diff --git a/addons/account/report/account_general_ledger_landscape.rml b/addons/account/report/account_general_ledger_landscape.rml deleted file mode 100644 index c5d24343148..00000000000 --- a/addons/account/report/account_general_ledger_landscape.rml +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - Date - - - Period - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - Currency - - - - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - Date - - - Period - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - - - [[ repeatIn(objects, 'a') ]] - General Ledger - - - - - - - Company[[ data['model']=='account.account' and ' ' or removeParentNode('para') ]] - Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] - - Fiscal Year - - - Journals - - - Display Account - - - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - - - Entries Sorted By - - - Target Moves - - - - - - - [[ get_account(data) or removeParentNode('para') ]] - - - [[ get_fiscalyear(data) or '' ]] - - - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - - - All[[ data['form']['display_account']=='all' and ' ' or removeParentNode('para') ]] - With movements[[ data['form']['display_account']=='movement' and ' ' or removeParentNode('para') ]] - With balance is not equal to 0[[ data['form']['display_account']=='not_zero' and ' ' or removeParentNode('para') ]] - - - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - Start Date - - - End Date - - - - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - [[ formatLang(get_start_date(data),date=True) ]] - - - [[ formatLang(get_end_date(data),date=True) ]] - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - Start Period - - - End Period - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - [[ get_start_period(data) or removeParentNode('para') ]] - - - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - - [[ get_sortby(data) ]] - - - [[ get_target_move(data) ]] - - - - - - - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - Date - - - Period - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - Currency - - - -
- [[ repeatIn(get_children_accounts(a), 'o') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - - - [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj= company.currency_id) ]] - - - [[ o.currency_id and formatLang(sum_currency_amount_account(o), digits=get_digits(dp='Account'),currency_obj=o.currency_id) or '' ]] - - - -
- [[ repeatIn(lines(o), 'line') ]] - [[data['form']['amount_currency'] == True or removeParentNode('blockTable')]] - - - [[ formatLang(line['ldate'],date=True) ]] - - - [[ line['period_code'] ]] - - - [[ line['lcode'] ]] - - - [[ strip_name(line['partner_name'],20) ]] - - - [[ line['lref'] and strip_name(line['lref'],17) ]] - - - [[ line['move'] ]] - - - [[ strip_name(line['lname'],22) ]] - - - [[ strip_name(line['line_corresp'],18) ]] - - - [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['progress'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ (line.has_key('currency_id') and line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'])]] [[ line['currency_code'] or '']] - - - -
-
- [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - Date - - - Period - - - JRNL - - - Partner - - - Ref - - - Move - - - Entry Label - - - Counterpart - - - Debit - - - Credit - - - Balance - - - -
- [[ repeatIn(get_children_accounts(a), 'o') ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - [[ '..'*(o.level-1) ]][[ o.code ]] [[ o.name ]] - - - [[ formatLang(sum_debit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_credit_account(o), digits=get_digits(dp='Account')) ]] - - - [[ formatLang(sum_balance_account(o), digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - -
- [[ repeatIn(lines(o), 'line') ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - - - [[ formatLang(line['ldate'],date=True) ]] - - - [[ line['period_code'] ]] - - - [[ line['lcode'] ]] - - - [[ strip_name(line['partner_name'],24) ]] - - - [[ strip_name(line['lref'],21) ]] - - - [[ line['move'] ]] - - - [[ strip_name(line['lname'],28) ]] - - - [[ strip_name(line['line_corresp'],23) ]] - - - [[ formatLang(line['debit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['credit'], digits=get_digits(dp='Account')) ]] - - - [[ formatLang(line['progress'], digits=get_digits(dp='Account'),currency_obj=company.currency_id) ]] - - - -
-
-
-
-
diff --git a/addons/account/report/account_journal.rml b/addons/account/report/account_journal.rml deleted file mode 100644 index 6d606ed1937..00000000000 --- a/addons/account/report/account_journal.rml +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - Journal - - - - - - - - Company[[ data['model']=='account.journal.period'and ' ' or removeParentNode('para') ]] - Chart of Accounts[[ data['model']=='ir.ui.menu' and ' ' or removeParentNode('para') ]] - Fiscal Year - Journal - Period - Entries Sorted By - Target Moves - - - [[ get_account(data) or '' ]] - [[ get_fiscalyear(data) or '' ]] - [[ o.journal_id.name ]] - [[ o.period_id.name ]] - - Date[[ data['form'].get('sort_selection', 'date') == 'date' and ' ' or removeParentNode('para') ]] - Reference Number[[ data['form'].get('sort_selection', 'date') == 'ref' and ' ' or removeParentNode('para') ]] - - - - - - - - - - [[ set_last_move_id(False)]] -
- [[ display_currency(data) == False or removeParentNode('section') ]] - - - Move - Date - Account - Partner - Label - Debit - Credit - - -
- [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]] - - - [[ not check_last_move_id(line.move_id.id) and removeParentNode('blockTable') ]] - - - - - [[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] - [[ formatLang(line.date,date=True) ]] - [[ line.account_id.code ]] - [[ line.partner_id and strip_name(line.partner_id.name,23) ]] - [[ strip_name(line.name,35) ]] - [[ formatLang(line.debit, currency_obj=company.currency_id) ]] - [[ formatLang(line.credit, currency_obj=company.currency_id) ]] - - - [[ set_last_move_id(line.move_id.id) ]] -
- - - - - - - Total: - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - - -
- -
- [[ display_currency(data) or removeParentNode('section') ]] - - - Move - Date - Account - Partner - Label - Debit - Credit - Currency - - -
- [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]] - - - [[ not check_last_move_id(line.move_id.id) and removeParentNode('blockTable') ]] - - - - - [[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] - [[ formatLang(line.date,date=True) ]] - [[ line.account_id.code ]] - [[ line.partner_id and strip_name(line.partner_id.name,17) ]] - [[ strip_name(line.name,28) ]] - [[ formatLang(line.debit, currency_obj=company.currency_id) ]] - [[ formatLang(line.credit, currency_obj=company.currency_id) ]] - [[ line.currency_id and formatLang(line.amount_currency, currency_obj=line.currency_id) or '' ]] - - - [[ set_last_move_id(line.move_id.id) ]] -
- - - - - - - Total: - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - - - - -
-
-
diff --git a/addons/account/report/account_journal_sale_purchase.rml b/addons/account/report/account_journal_sale_purchase.rml deleted file mode 100644 index 3ee0b484c9a..00000000000 --- a/addons/account/report/account_journal_sale_purchase.rml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - Journal - - - - - - - - [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]] - [[ data['model']=='ir.ui.menu' and 'Chart of Accounts' or removeParentNode('para') ]] - Fiscal Year - Journal - Period - Entries Sorted By - Target Moves - - - [[ get_account(data) or '' ]] - [[ get_fiscalyear(data) or '' ]] - [[ o.journal_id.name ]] - [[ o.period_id.name ]] - [[ get_sortby(data) ]] - [[ get_target_move(data) ]] - - - - - - - - - [[ set_last_move_id(False) ]] -
- [[ display_currency(data) == False or removeParentNode('section') ]] - - - Move - Date - Account - Partner - Label - Tax - - Debit - Credit - - -
- [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]] - - - [[ not check_last_move_id(line.move_id.id) and removeParentNode('blockTable') ]] - - - - - [[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] - [[ formatLang(line.date,date=True) ]] - [[ line.account_id.code ]] - [[ line.partner_id and strip_name(line.partner_id.name,15) ]] - [[ strip_name(line.name,25) ]] - [[ line.tax_code_id and line.tax_code_id.code and (line.tax_code_id.code + ':') ]] - [[ line.tax_amount and formatLang(line.tax_amount, currency_obj=company.currency_id) ]] - [[ formatLang(line.debit, currency_obj=company.currency_id) ]] - [[ formatLang(line.credit, currency_obj=company.currency_id) ]] - - - [[ set_last_move_id(line.move_id.id) ]] -
- - - - - - - - - Total: - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - - -
- -
- [[ display_currency(data) or removeParentNode('section') ]] - - - Move - Date - Account - Partner - Label - Tax - - Debit - Credit - Currency - - -
- [[ repeatIn(lines(o.period_id.id, o.journal_id.id), 'line') ]] - - - [[ not check_last_move_id(line.move_id.id) and removeParentNode('blockTable') ]] - - - - - [[ line.move_id.name <> '/' and line.move_id.name or ('*'+str(line.move_id.id)) ]] - [[ formatLang(line.date,date=True) ]] - [[ line.account_id.code ]] - [[ line.partner_id and strip_name(line.partner_id.name,12) ]] - [[ strip_name(line.name,16) ]] - [[ line.tax_code_id and line.tax_code_id.code and (line.tax_code_id.code + ':') ]] - [[ line.tax_amount and formatLang(line.tax_amount, currency_obj=company.currency_id) ]] - [[ formatLang(line.debit, currency_obj=company.currency_id) ]] - [[ formatLang(line.credit, currency_obj=company.currency_id) ]] - [[ line.currency_id and formatLang(line.amount_currency, currency_obj=line.currency_id) or '' ]] - - - [[ set_last_move_id(line.move_id.id) ]] -
- - - - - - - - - Total: - [[ formatLang(sum_debit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - [[ formatLang(sum_credit(o.period_id.id, o.journal_id.id), currency_obj=company.currency_id) ]] - - - - -
- - - - - - - -
- - - - - - Tax Declaration - - - - - [[ repeatIn(tax_codes(o.period_id.id,o.journal_id.id), 't') ]][[ t.code + ': ' ]] - [[ formatLang(sum_vat( o.period_id.id, o.journal_id.id, t.id)) ]] - - [[ t.name ]] - - -
-
-
diff --git a/addons/account/report/account_partner_balance.rml b/addons/account/report/account_partner_balance.rml deleted file mode 100644 index a99a7f062ec..00000000000 --- a/addons/account/report/account_partner_balance.rml +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Partner Balance - - - - - - - - - Chart of Accounts - Fiscal Year - Journals - Filter By [[ data['form']['filter']!='filter_no' and get_filter(data) ]] - Partner's - Target Moves - - - [[ get_account(data) or removeParentNode('para') ]] - [[ get_fiscalyear(data) or '' ]] - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - - [[ data['form']['filter']=='filter_no' and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - Start Date - End Date - - - [[ formatLang(get_start_date(data),date=True) ]] - [[ formatLang(get_end_date(data),date=True) ]] - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - Start Period - End Period - - - [[ get_start_period(data) or removeParentNode('para') ]] - [[ get_end_period(data) or removeParentNode('para') ]] - - - - [[ get_partners() ]] - [[ get_target_move(data) ]] - - - - - - - - - - Code - (Account/Partner) Name - Debit - Credit - Balance - In dispute - - - Total: - - [[ formatLang(sum_debit()) ]] - [[ formatLang(sum_credit()) ]] - [[ formatLang((sum_debit()-sum_credit()), currency_obj=company.currency_id) ]] - [[ formatLang(sum_litige(), currency_obj=company.currency_id) ]] - - - [[ 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']) ]] - [[ (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'], currency_obj=company.currency_id) ]] - [[ (a['type']==3 and setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['enlitige'] or 0.0, currency_obj=company.currency_id) ]] - - - - diff --git a/addons/account/report/account_partner_ledger.rml b/addons/account/report/account_partner_ledger.rml deleted file mode 100644 index 48ed6d4afe3..00000000000 --- a/addons/account/report/account_partner_ledger.rml +++ /dev/null @@ -1,658 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - - - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - Currency - - - - - [[ repeatIn(objects, 'p') ]] - [[ setLang(p.lang) ]] - - - - Partner Ledger - - - - - - - Chart of Accounts - - - Fiscal Year - - - Journals - - - Filters By [[ data['form']['filter'] not in ('filter_no','unreconciled') and get_filter(data) ]] - - - Partner's - - - Target Moves - - - - - - - [[ get_account(data) or '' ]] - - - [[ get_fiscalyear(data) or '' ]] - - - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - - - [[ data['form']['filter'] in ('filter_no','unreconciled') and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - Start Date - - - End Date - - - - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - [[ formatLang(get_start_date(data),date=True) ]] - - - [[ formatLang(get_end_date(data),date=True) ]] - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - Start Period - - - End Period - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - [[ get_start_period(data) or removeParentNode('para') ]] - - - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - - - - - Receivable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer' or removeParentNode('para') ]] - Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'supplier' or removeParentNode('para') ]] - Receivable and Payable Accounts[[ data['form'].get('result_selection', 'customer') == 'customer_supplier' or removeParentNode('para') ]] - - - [[ get_target_move(data) ]] - - - - - - -
- - [[ display_currency(data) == False or removeParentNode('section') ]] - - - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - - - - - [[ p.ref ]] - [[ p.name ]] - - - [[ formatLang((sum_debit_partner(p))) ]] - - - [[ formatLang((sum_credit_partner(p))) ]] - - - [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]] - - - -
- - [[data['form']['initial_balance']==True or removeParentNode('section') ]] - - - - - Initial Balance - - - [[ formatLang(get_intial_balance(p)[0][0])]] - - - [[ formatLang(get_intial_balance(p)[0][1]) ]] - - - [[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]] - - - -
-
- [[ repeatIn(lines(p), 'line') ]] - - - - [[ formatLang(line['date'],date=True) ]] - - - [[ line['code'] ]] - - - [[ line['move_name'] ]] - - - [[ line['a_code'] ]] - - - [[ line['ref'] and strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]] - - - [[ formatLang((line['debit'])) ]] - - - [[ formatLang((line['credit'])) ]] - - - [[ formatLang((line['progress']), currency_obj=company.currency_id) ]] - - - -
-
-
- - [[ display_currency(data) == True or removeParentNode('section') ]] - - - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - Currency - - - - - - - [[ p.ref ]] - [[ p.name ]] - - - [[ formatLang((sum_debit_partner(p))) ]] - - - [[ formatLang((sum_credit_partner(p))) ]] - - - [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]] - - - - - - - - -
- [[ data['form']['initial_balance']==True or removeParentNode('section') ]] - - - - Initial Balance - - - [[ formatLang(get_intial_balance(p)[0][0])]] - - - [[ formatLang(get_intial_balance(p)[0][1]) ]] - - - [[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]] - - - - - - - - -
-
- [[ repeatIn(lines(p), 'line') ]] - - - - [[ formatLang(line['date'],date=True) ]] - - - [[ line['code'] ]] - - - [[ line['move_name'] ]] - - - [[ line['a_code'] ]] - - - [[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]] - - - [[ formatLang((line['debit'])) ]] - - - [[ formatLang((line['credit'])) ]] - - - [[ formatLang((line['progress']), currency_obj=company.currency_id) ]] - - - - [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] - - - - -
-
-
-
-
diff --git a/addons/account/report/account_partner_ledger_other.rml b/addons/account/report/account_partner_ledger_other.rml deleted file mode 100644 index b878ab44e47..00000000000 --- a/addons/account/report/account_partner_ledger_other.rml +++ /dev/null @@ -1,665 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - - - [[ display_currency(data) == True or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - Currency - - - - - - - - - Partner Ledger - - - - - - - Chart of Accounts - - - Fiscal Year - - - Journals - - - Filters By [[ data['form']['filter'] not in ('filter_no','unreconciled') and get_filter(data) ]] - - - Partner's - - - Target Moves - - - - - - - [[ get_account(data) or '' ]] - - - [[ get_fiscalyear(data) or '' ]] - - - [[', '.join([ lt or '' for lt in get_journal(data) ]) ]] - - - [[ data['form']['filter'] in ('filter_no','unreconciled') and get_filter(data) or removeParentNode('para') ]] - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - Start Date - - - End Date - - - - [[ data['form']['filter']=='filter_date' or removeParentNode('blockTable') ]] - - - [[ formatLang(get_start_date(data),date=True) ]] - - - [[ formatLang(get_end_date(data),date=True) ]] - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - Start Period - - - End Period - - - - [[ data['form']['filter']=='filter_period' or removeParentNode('blockTable') ]] - - - [[ get_start_period(data) or removeParentNode('para') ]] - - - [[ get_end_period(data) or removeParentNode('para') ]] - - - - - - - - - [[ get_partners() ]] - - - [[ get_target_move(data) ]] - - - - - - - - [[ display_currency(data) == False or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - -
- [[ repeatIn(objects, 'p') ]] - [[ setLang(p.lang) ]] - - [[ display_currency(data) == False or removeParentNode('section') ]] - - - - - - [[ p.ref ]] - [[ p.name ]] - - - [[ formatLang((sum_debit_partner(p))) ]] - - - [[ formatLang((sum_credit_partner(p))) ]] - - - [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]] - - - -
- - [[data['form']['initial_balance']==True or removeParentNode('section') ]] - - - - - Initial Balance - - - [[ formatLang(get_intial_balance(p)[0][0])]] - - - [[ formatLang(get_intial_balance(p)[0][1]) ]] - - - [[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]] - - - -
-
- [[ repeatIn(lines(p), 'line') ]] - - - - [[ formatLang(line['date'],date=True) ]] - - - [[ line['code'] ]] - - - [[ line['move_name'] ]] - - - [[ line['a_code'] ]] - - - [[ line['ref'] and strip_name(line['ref'],10) ]] - [[ strip_name(line['name'],15) ]] - - - [[ formatLang((line['debit'])) ]] - - - [[ formatLang((line['credit'])) ]] - - - [[ formatLang((line['progress']), currency_obj=company.currency_id) ]] - - - -
-
- - [[ display_currency(data) == True or removeParentNode('blockTable') ]] - - - Date - - - JRNL - - - Ref - - - Account - - - Entry Label - - - Debit - - - Credit - - - Balance - - - Currency - - - -
- [[ repeatIn(objects, 'p') ]] - [[ setLang(p.lang) ]] - - [[ display_currency(data) == True or removeParentNode('section') ]] - - - - - - [[ p.ref ]] - [[ p.name ]] - - - [[ formatLang((sum_debit_partner(p))) ]] - - - [[ formatLang((sum_credit_partner(p))) ]] - - - [[ formatLang((sum_debit_partner(p) - sum_credit_partner(p)), currency_obj=company.currency_id) ]] - - - - - - - - -
- [[ data['form']['initial_balance']==True or removeParentNode('section') ]] - - - - Initial Balance - - - [[ formatLang(get_intial_balance(p)[0][0])]] - - - [[ formatLang(get_intial_balance(p)[0][1]) ]] - - - [[ formatLang(get_intial_balance(p)[0][2], currency_obj=company.currency_id) ]] - - - - - - - - -
-
- [[ repeatIn(lines(p), 'line') ]] - - - - [[ formatLang(line['date'],date=True) ]] - - - [[ line['code'] ]] - - - [[ line['move_name'] ]] - - - [[ line['a_code'] ]] - - - [[ strip_name(line['ref'],8) ]] - [[ strip_name(line['name'],7) ]] - - - [[ formatLang((line['debit'])) ]] - - - [[ formatLang((line['credit'])) ]] - - - [[ formatLang((line['progress']), currency_obj=company.currency_id) ]] - - - - [[ (line['currency_id']==None or line['amount_currency']==None) and removeParentNode('font') ]] [[ formatLang(line['amount_currency'] ) ]] [[ line['currency_code'] or '' ]] - - - - -
-
-
-
-
diff --git a/addons/account/report/account_print_invoice.py b/addons/account/report/account_print_invoice.py deleted file mode 100644 index 75680810254..00000000000 --- a/addons/account/report/account_print_invoice.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import time -from openerp.report import report_sxw - -class account_invoice(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(account_invoice, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - 'time': time, - }) -report_sxw.report_sxw( - 'report.account.invoice', - 'account.invoice', - 'addons/account/report/account_print_invoice.rml', - parser=account_invoice -) -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_print_invoice.rml b/addons/account/report/account_print_invoice.rml deleted file mode 100644 index 6914adfaf20..00000000000 --- a/addons/account/report/account_print_invoice.rml +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] - [[ setLang(o.partner_id.lang) ]] - - - - Description - Taxes - Quantity - Unit Price - Disc.(%) - Price - - - - - - - - - - - - [[ (o.partner_id and o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ display_address(o.partner_id) ]] - - - - Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]] - Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]] - TIN : [[ (o.partner_id.vat) or removeParentNode('para') ]] - - - - Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]] - PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]] - Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]] - Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]] - Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]] - - - - - - - Description - - - Invoice Date - - - Source - - - Customer Code - - - - - - - [[ o.name or ' ' ]] - - - [[ formatLang(o.date_invoice,date=True) ]] - - - [[ o.origin or '' ]] - - - [[ (o.partner_id.ref) or ' ' ]] - - - - - - - - - - Description - - - Taxes - - - Quantity - - - Unit Price - - - Disc.(%) - - - Price - - - -
- [[ repeatIn(o.invoice_line,'l') ]] - - - - [[ format(l.name) ]] - - - [[ ', '.join([ lt.name or '' for lt in l.invoice_line_tax_id ]) ]] - - - [[ formatLang(l.quantity)]] [[ (l.uos_id and l.uos_id.name) or '' ]] - - - [[ formatLang(l.price_unit) ]] - - - [[ formatLang(l.discount, dp='Account') ]] - - - [[ formatLang(l.price_subtotal, dp='Account', currency_obj=o.currency_id) ]] - - - -
- - - - - - - - - Net Total: - - - [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] - - - - - - - - - - Taxes: - - - [[ formatLang(o.amount_tax, dp='Account', currency_obj=o.currency_id) ]] - - - - - - - - - - Total: - - - [[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] - - - - - - - - - - Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]] - - - Base - - - Amount - - - - - - - - -
- [[ repeatIn(o.tax_line,'t') ]] - - - - [[ t.name ]] - - - [[ formatLang(t.base, dp='Account', currency_obj=o.currency_id) ]] - - - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] - - - - - - - - -
- - - - [[ (o.comment and format(o.comment )) or removeParentNode('para') ]] - - - - [[ (o.payment_term and o.payment_term.note and format(o.payment_term and o.payment_term.note)) or removeParentNode('para') ]] - - - - - - - Fiscal Position Remark : - - - [[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]] - - - - - - -
-
-
diff --git a/addons/account/report/account_print_overdue.rml b/addons/account/report/account_print_overdue.rml deleted file mode 100644 index 9d1898572ba..00000000000 --- a/addons/account/report/account_print_overdue.rml +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Date - - - Description - - - Ref - - - Maturity date - - - Due - - - Paid - - - Maturity - - - Li. - - - - - [[ repeatIn(objects,'o') ]] - [[ setLang(o.lang) ]] - - - - - - [[ o.title.name or '' ]] [[ o.name ]] - [[ display_address(o) ]] - - - - VAT: [[ o.vat or removeParentNode('para') ]] - - - - - - - - - - Document: Customer account statement - Date: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] - Customer Ref: [[ o.ref or ' ']] - - - - - - -
- [[ not getLines(o) and removeParentNode('section')]] -
- [[repeatIn(message(o, company), 'message_line') ]] - [[ message_line ]] - - - -
- - - - Date - - - Description - - - Ref - - - Maturity date - - - Due - - - Paid - - - Maturity - - - Li. - - - -
[[repeatIn(getLines(o), 'line') ]] - - - - [[ formatLang(line['date'],date=True) ]] - - - [[ line['name'] ]] - - - [[ line['ref'] ]] - - - [[ 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 ' ') ]] - - - [[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]] - - - [[ (time.strftime('%Y-%m-%d') > line['date_maturity']) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]] - - - [[ line['blocked'] and 'X' or '' ]] - - - -
- - - - - - - - - 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))) ]] - - - [[ 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)), currency_obj=company.currency_id) ]] - - - - - - - - - - - - - - - - - Balance : - - - [[ formatLang((reduce(lambda x, y: x +(y['debit'] - y['credit']), getLines(o), 0)), currency_obj = company.currency_id) ]] - - - - - - - - - - - - - - - Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), getLines(o), 0)), currency_obj=company.currency_id) ]] -
- - - -
- [[ getLines(o) and removeParentNode('section')]]There is nothing due with this customer. -
- - - - - - -
-
-
diff --git a/addons/account/views/report_agedpartnerbalance.xml b/addons/account/views/report_agedpartnerbalance.xml new file mode 100644 index 00000000000..9ab05afa772 --- /dev/null +++ b/addons/account/views/report_agedpartnerbalance.xml @@ -0,0 +1,133 @@ + + + + + + diff --git a/addons/account/views/report_centraljournal.xml b/addons/account/views/report_centraljournal.xml new file mode 100644 index 00000000000..e939fa98fc3 --- /dev/null +++ b/addons/account/views/report_centraljournal.xml @@ -0,0 +1,93 @@ + + + + + + diff --git a/addons/account/views/report_financial.xml b/addons/account/views/report_financial.xml new file mode 100644 index 00000000000..69802331a5b --- /dev/null +++ b/addons/account/views/report_financial.xml @@ -0,0 +1,128 @@ + + + + + + diff --git a/addons/account/views/report_generaljournal.xml b/addons/account/views/report_generaljournal.xml new file mode 100644 index 00000000000..2dd07cf87fd --- /dev/null +++ b/addons/account/views/report_generaljournal.xml @@ -0,0 +1,98 @@ + + + + + + diff --git a/addons/account/views/report_generalledger.xml b/addons/account/views/report_generalledger.xml new file mode 100644 index 00000000000..d873571dee3 --- /dev/null +++ b/addons/account/views/report_generalledger.xml @@ -0,0 +1,133 @@ + + + + + + + diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml new file mode 100644 index 00000000000..bc0dc5e92a2 --- /dev/null +++ b/addons/account/views/report_invoice.xml @@ -0,0 +1,153 @@ + + + + + + + + diff --git a/addons/account/views/report_journal.xml b/addons/account/views/report_journal.xml new file mode 100644 index 00000000000..a9cd56b4109 --- /dev/null +++ b/addons/account/views/report_journal.xml @@ -0,0 +1,88 @@ + + + + + + diff --git a/addons/account/views/report_overdue.xml b/addons/account/views/report_overdue.xml new file mode 100644 index 00000000000..080de9a5615 --- /dev/null +++ b/addons/account/views/report_overdue.xml @@ -0,0 +1,113 @@ + + + + + + diff --git a/addons/account/views/report_partnerbalance.xml b/addons/account/views/report_partnerbalance.xml new file mode 100644 index 00000000000..11948905fe9 --- /dev/null +++ b/addons/account/views/report_partnerbalance.xml @@ -0,0 +1,125 @@ + + + + + + diff --git a/addons/account/views/report_partnerledger.xml b/addons/account/views/report_partnerledger.xml new file mode 100644 index 00000000000..333fab7aa5c --- /dev/null +++ b/addons/account/views/report_partnerledger.xml @@ -0,0 +1,131 @@ + + + + + + diff --git a/addons/account/views/report_partnerledgerother.xml b/addons/account/views/report_partnerledgerother.xml new file mode 100644 index 00000000000..b8f3d525f51 --- /dev/null +++ b/addons/account/views/report_partnerledgerother.xml @@ -0,0 +1,131 @@ + + + + + + diff --git a/addons/account/views/report_salepurchasejournal.xml b/addons/account/views/report_salepurchasejournal.xml new file mode 100644 index 00000000000..a6441122125 --- /dev/null +++ b/addons/account/views/report_salepurchasejournal.xml @@ -0,0 +1,107 @@ + + + + + + diff --git a/addons/account/views/report_trialbalance.xml b/addons/account/views/report_trialbalance.xml new file mode 100644 index 00000000000..6a27b957971 --- /dev/null +++ b/addons/account/views/report_trialbalance.xml @@ -0,0 +1,94 @@ + + + + + + diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py index 48bdfd33081..df1fa94ae90 100644 --- a/addons/account/wizard/account_financial_report.py +++ b/addons/account/wizard/account_financial_report.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv + class accounting_report(osv.osv_memory): _name = "accounting.report" _inherit = "account.common.report" @@ -83,16 +84,13 @@ class accounting_report(osv.osv_memory): if isinstance(data['form'][field], tuple): data['form'][field] = data['form'][field][0] comparison_context = self._build_comparison_context(cr, uid, ids, data, context=context) - res['datas']['form']['comparison_context'] = comparison_context + res['data'] = {} + res['data']['form'] = data['form'] + res['data']['form']['comparison_context'] = comparison_context return res def _print_report(self, cr, uid, ids, data, context=None): data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'debit_credit', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter','target_move'], context=context)[0]) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.financial.report', - 'datas': data, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account.report_financial', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_account_balance.py b/addons/account/wizard/account_report_account_balance.py index fd3c966e306..3b9d3c21777 100644 --- a/addons/account/wizard/account_report_account_balance.py +++ b/addons/account/wizard/account_report_account_balance.py @@ -36,7 +36,6 @@ class account_balance_report(osv.osv_memory): def _print_report(self, cr, uid, ids, data, context=None): data = self.pre_print_report(cr, uid, ids, data, context=context) - return {'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data} - + return self.pool['report'].get_action(cr, uid, ids, 'account.report_trialbalance', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index c483487b78f..c918a1119fd 100644 --- a/addons/account/wizard/account_report_aged_partner_balance.py +++ b/addons/account/wizard/account_report_aged_partner_balance.py @@ -25,6 +25,7 @@ from dateutil.relativedelta import relativedelta from openerp.osv import fields, osv from openerp.tools.translate import _ + class account_aged_trial_balance(osv.osv_memory): _inherit = 'account.common.partner.report' _name = 'account.aged.trial.balance' @@ -80,11 +81,6 @@ class account_aged_trial_balance(osv.osv_memory): data['form'].update(res) if data.get('form',False): data['ids']=[data['form'].get('chart_account_id',False)] - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.aged_trial_balance', - 'datas': data - } - + return self.pool['report'].get_action(cr, uid, ids, 'account.report_agedpartnerbalance', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_central_journal.py b/addons/account/wizard/account_report_central_journal.py index a6bc111fa35..9f22d49afac 100644 --- a/addons/account/wizard/account_report_central_journal.py +++ b/addons/account/wizard/account_report_central_journal.py @@ -32,13 +32,6 @@ class account_central_journal(osv.osv_memory): def _print_report(self, cr, uid, ids, data, context=None): data = self.pre_print_report(cr, uid, ids, data, context=context) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.central.journal', - 'datas': data, - } - - -#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + return self.pool['report'].get_action(cr, uid, ids, 'account.report_centraljournal', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_general_journal.py b/addons/account/wizard/account_report_general_journal.py index e5e516b1f38..3d9d55b19c1 100644 --- a/addons/account/wizard/account_report_general_journal.py +++ b/addons/account/wizard/account_report_general_journal.py @@ -32,9 +32,6 @@ class account_general_journal(osv.osv_memory): def _print_report(self, cr, uid, ids, data, context=None): data = self.pre_print_report(cr, uid, ids, data, context=context) - return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': data} - - -#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + return self.pool['report'].get_action(cr, uid, ids, 'account.report_generaljournal', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_general_ledger.py b/addons/account/wizard/account_report_general_ledger.py index fae60df63fb..c75477da40a 100644 --- a/addons/account/wizard/account_report_general_ledger.py +++ b/addons/account/wizard/account_report_general_ledger.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv + class account_report_general_ledger(osv.osv_memory): _inherit = "account.common.account.report" _name = "account.report.general.ledger" @@ -54,9 +55,10 @@ class account_report_general_ledger(osv.osv_memory): data['form'].update(self.read(cr, uid, ids, ['landscape', 'initial_balance', 'amount_currency', 'sortby'])[0]) if not data['form']['fiscalyear_id']:# GTK client problem onchange does not consider in save record data['form'].update({'initial_balance': False}) - if data['form']['landscape']: - return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger_landscape', 'datas': data} - return { 'type': 'ir.actions.report.xml', 'report_name': 'account.general.ledger', 'datas': data} + if data['form']['landscape'] is False: + data['form'].pop('landscape') + + return self.pool['report'].get_action(cr, uid, ids, 'account.report_generalledger', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_partner_balance.py b/addons/account/wizard/account_report_partner_balance.py index fbe18f27d69..d4b5fb27d14 100644 --- a/addons/account/wizard/account_report_partner_balance.py +++ b/addons/account/wizard/account_report_partner_balance.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv + class account_partner_balance(osv.osv_memory): """ This wizard will provide the partner balance report by periods, between any two dates. @@ -35,7 +36,6 @@ class account_partner_balance(osv.osv_memory): } _defaults = { -# 'initial_balance': True, 'display_partner': 'non-zero_balance', } @@ -44,11 +44,6 @@ class account_partner_balance(osv.osv_memory): context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) data['form'].update(self.read(cr, uid, ids, ['display_partner'])[0]) - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.partner.balance', - 'datas': data, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account.report_partnerbalance', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_partner_ledger.py b/addons/account/wizard/account_report_partner_ledger.py index fdabe49ff17..75f79512603 100644 --- a/addons/account/wizard/account_report_partner_ledger.py +++ b/addons/account/wizard/account_report_partner_ledger.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv + class account_partner_ledger(osv.osv_memory): """ This wizard will provide the partner Ledger report by periods, between any two dates. @@ -37,6 +38,7 @@ class account_partner_ledger(osv.osv_memory): 'amount_currency': fields.boolean("With Currency", help="It adds the currency column on report if the currency differs from the company currency."), 'journal_ids': fields.many2many('account.journal', 'account_partner_ledger_journal_rel', 'account_id', 'journal_id', 'Journals', required=True), } + _defaults = { 'initial_balance': False, 'page_split': False, @@ -45,8 +47,8 @@ class account_partner_ledger(osv.osv_memory): def onchange_filter(self, cr, uid, ids, filter='filter_no', fiscalyear_id=False, context=None): res = super(account_partner_ledger, self).onchange_filter(cr, uid, ids, filter=filter, fiscalyear_id=fiscalyear_id, context=context) if filter in ['filter_no', 'unreconciled']: - if filter == 'unreconciled': - res['value'].update({'fiscalyear_id': False}) + if filter == 'unreconciled': + res['value'].update({'fiscalyear_id': False}) res['value'].update({'initial_balance': False, 'period_from': False, 'period_to': False, 'date_from': False ,'date_to': False}) return res @@ -55,17 +57,6 @@ class account_partner_ledger(osv.osv_memory): context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'filter', 'page_split', 'amount_currency'])[0]) - if data['form']['page_split']: - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.third_party_ledger', - 'datas': data, - } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.third_party_ledger_other', - 'datas': data, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account.report_partnerledger', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_print_journal.py b/addons/account/wizard/account_report_print_journal.py index 3ad45268248..3aafc63acf4 100644 --- a/addons/account/wizard/account_report_print_journal.py +++ b/addons/account/wizard/account_report_print_journal.py @@ -22,6 +22,7 @@ from openerp.osv import fields, osv from lxml import etree + class account_print_journal(osv.osv_memory): _inherit = "account.common.journal.report" _name = 'account.print.journal' @@ -60,19 +61,14 @@ class account_print_journal(osv.osv_memory): res['arch'] = etree.tostring(doc) return res - def _print_report(self, cr, uid, ids, data, context=None): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, context=context) data['form'].update(self.read(cr, uid, ids, ['sort_selection'], context=context)[0]) if context.get('sale_purchase_only'): - report_name = 'account.journal.period.print.sale.purchase' + return self.pool['report'].get_action(cr, uid, ids, 'account.report_salepurchasejournal', data=data, context=context) else: - report_name = 'account.journal.period.print' - return {'type': 'ir.actions.report.xml', 'report_name': report_name, 'datas': data} - - -#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + return self.pool['report'].get_action(cr, uid, ids, 'account.report_journal', data=data, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_vat.py b/addons/account/wizard/account_vat.py index 6fbfcc9ddf5..5cc5c678df1 100644 --- a/addons/account/wizard/account_vat.py +++ b/addons/account/wizard/account_vat.py @@ -21,6 +21,7 @@ from openerp.osv import fields, osv + class account_vat_declaration(osv.osv_memory): _name = 'account.vat.declaration' _description = 'Account Vat Declaration' @@ -60,6 +61,6 @@ class account_vat_declaration(osv.osv_memory): taxcode = taxcode_obj.browse(cr, uid, [taxcode_id], context=context)[0] datas['form']['company_id'] = taxcode.company_id.id - return self.pool['report'].get_action(cr, uid, ids, 'account.report_vat', datas=datas, context=context) + return self.pool['report'].get_action(cr, uid, ids, 'account.report_vat', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_analytic_plans/__openerp__.py b/addons/account_analytic_plans/__openerp__.py index af5b5654b99..7c580bd14f2 100644 --- a/addons/account_analytic_plans/__openerp__.py +++ b/addons/account_analytic_plans/__openerp__.py @@ -19,7 +19,6 @@ # ############################################################################## - { 'name': 'Multiple Analytic Plans', 'version': '1.0', @@ -74,9 +73,10 @@ The analytic plan validates the minimum and maximum percentage at the time of cr 'account_analytic_plans_report.xml', 'wizard/analytic_plan_create_model_view.xml', 'wizard/account_crossovered_analytic_view.xml', + 'views/report_crossoveredanalyticplans.xml', ], 'demo': [], - 'test': ['test/acount_analytic_plans_report.yml'], + 'test': [], 'installable': True, 'auto_install': False, } diff --git a/addons/account_analytic_plans/account_analytic_plans_report.xml b/addons/account_analytic_plans/account_analytic_plans_report.xml index 05d4c5b445c..608a22d1d96 100644 --- a/addons/account_analytic_plans/account_analytic_plans_report.xml +++ b/addons/account_analytic_plans/account_analytic_plans_report.xml @@ -1,16 +1,15 @@ - - + report_type="qweb-pdf" + name="account_analytic_plans.report_crossoveredanalyticplans" + file="account_analytic_plans.report_crossoveredanalyticplans" + menu="False" + /> diff --git a/addons/account_analytic_plans/report/crossovered_analytic.rml b/addons/account_analytic_plans/report/crossovered_analytic.rml deleted file mode 100644 index 48e7c13b0a1..00000000000 --- a/addons/account_analytic_plans/report/crossovered_analytic.rml +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Account Name - - - Code - - - Quantity - - - Amount - - - Perc(%) - - - - - - - - Crossovered Analytic - - - - - - - From Date - - - To Date - - - Company - - - Currency - - - Printing date - - - - - - - [[ formatLang(data['form']['date1'],date=True) ]] - - - [[ formatLang(data['form']['date2'],date=True) ]] - - - [[ company.name ]] - - - [[ company.currency_id.name ]] - - - [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S') ]] - - - - - - - Analytic Account Reference: - - - - - - - Account Name - - - Code - - - Quantity - - - Amount - - - Perc(%) - - - -
- [[ repeatIn(ref_lines(data['form']),'a') ]] - - - - [[ a['ref_name'] ]] - - - [[ a['ref_code'] ]] - - - [[ a['ref_qty'] and formatLang(a['ref_qty']) ]] - - - [[ a['ref_amt'] and formatLang(a['ref_amt'], currency_obj=company.currency_id) ]] - - - 100.00% - - - -
- - - - Analytic Account : - - - - - - - Account Name - - - Code - - - Quantity - - - Amount - - - Percentage - - - -
- [[ repeatIn(lines(data['form']),'a') ]] - - - - [[ a['acc_name'] ]] - - - [[ a['code'] ]] - - - [[formatLang(a['qty']) ]] - - - [[ formatLang(a['amt'], currency_obj=company.currency_id) ]] - - - [[ formatLang(a['perc']) ]]% - - - - - - -
-
-
-
diff --git a/addons/account_analytic_plans/views/report_crossoveredanalyticplans.xml b/addons/account_analytic_plans/views/report_crossoveredanalyticplans.xml new file mode 100644 index 00000000000..bce3cccd5c7 --- /dev/null +++ b/addons/account_analytic_plans/views/report_crossoveredanalyticplans.xml @@ -0,0 +1,66 @@ + + + + + + diff --git a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py index d3581d6c457..ccac123c681 100644 --- a/addons/account_analytic_plans/wizard/account_crossovered_analytic.py +++ b/addons/account_analytic_plans/wizard/account_crossovered_analytic.py @@ -65,11 +65,6 @@ class account_crossovered_analytic(osv.osv_memory): 'model': 'account.analytic.account', 'form': data } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.crossovered.analytic', - 'datas': datas, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account_analytic_plans.report_crossoveredanalyticplans', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_bank_statement_extensions/__openerp__.py b/addons/account_bank_statement_extensions/__openerp__.py index 7571eef3e54..203011c46c5 100644 --- a/addons/account_bank_statement_extensions/__openerp__.py +++ b/addons/account_bank_statement_extensions/__openerp__.py @@ -50,6 +50,7 @@ This module adds: 'wizard/confirm_statement_line_wizard.xml', 'wizard/cancel_statement_line_wizard.xml', 'data/account_bank_statement_extensions_data.xml', + 'views/report_bankstatementbalance.xml', ], 'auto_install': False, 'installable': True, diff --git a/addons/account_bank_statement_extensions/account_bank_statement_report.xml b/addons/account_bank_statement_extensions/account_bank_statement_report.xml index b4dafbfd9a7..861c3822520 100644 --- a/addons/account_bank_statement_extensions/account_bank_statement_report.xml +++ b/addons/account_bank_statement_extensions/account_bank_statement_report.xml @@ -1,16 +1,13 @@ - - - - - + + + diff --git a/addons/account_bank_statement_extensions/report/bank_statement_balance_report.rml b/addons/account_bank_statement_extensions/report/bank_statement_balance_report.rml deleted file mode 100644 index 963b5d9dd68..00000000000 --- a/addons/account_bank_statement_extensions/report/bank_statement_balance_report.rml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ ]] - - - - - - - Bank Statement Balances Report - - - - - - - - - - - - - Name - - - Date - - - Journal - - - Closing Balance - - - - - - -
- [[ repeatIn(lines, 'l') ]] - - - - [[ l['s_name'] ]] - - - [[ l['s_date'] ]] - - - [[ l['j_code'] ]] - - - [[ formatLang(l['s_balance']) ]] - - - - - - -
- - - -
-
- diff --git a/addons/account_bank_statement_extensions/views/report_bankstatementbalance.xml b/addons/account_bank_statement_extensions/views/report_bankstatementbalance.xml new file mode 100644 index 00000000000..a8ca5f54d3a --- /dev/null +++ b/addons/account_bank_statement_extensions/views/report_bankstatementbalance.xml @@ -0,0 +1,35 @@ + + + + + + diff --git a/addons/account_budget/__openerp__.py b/addons/account_budget/__openerp__.py index 222178b940c..695fd794b9f 100644 --- a/addons/account_budget/__openerp__.py +++ b/addons/account_budget/__openerp__.py @@ -19,7 +19,6 @@ # ############################################################################## - { 'name': 'Budgets Management', 'version': '1.0', @@ -61,13 +60,18 @@ Three reports are available: 'wizard/account_budget_report_view.xml', 'wizard/account_budget_crossovered_summary_report_view.xml', 'wizard/account_budget_crossovered_report_view.xml', + + 'views/report_analyticaccountbudget.xml', + 'views/report_budget.xml', + 'views/report_crossoveredbudget.xml', ], 'demo': ['account_budget_demo.xml'], - 'test':[ + 'test': [ 'test/account_budget.yml', 'test/account_budget_report.yml', ], 'installable': True, 'auto_install': False, } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/account_budget_report.xml b/addons/account_budget/account_budget_report.xml index 9cc38154ef9..7855deb9ccc 100644 --- a/addons/account_budget/account_budget_report.xml +++ b/addons/account_budget/account_budget_report.xml @@ -1,24 +1,34 @@ - - - - - - - + /> + + + + - \ No newline at end of file + diff --git a/addons/account_budget/report/analytic_account_budget_report.rml b/addons/account_budget/report/analytic_account_budget_report.rml deleted file mode 100644 index 15fddebd02d..00000000000 --- a/addons/account_budget/report/analytic_account_budget_report.rml +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Description - - - Theoretical Amt - - - Planned Amt - - - Practical Amt - - - Perc(%) - - - - - [[repeatIn(objects,'o')]] - Analytic Budget - - - - - - - Analysis from - - - Analytic Account - - - Currency - - - - - - - [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]] - - - [[ o.name ]] - - - [[ company.currency_id.name ]] - - - - - - - - - - Description - - - Theoretical Amt - - - Planned Amt - - - Practical Amt - - - Perc(%) - - - -
- [[ repeatIn(funct(o,data['form']),'a') ]] - - - - [['.....' *(a['status']-1) ]] [[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc']) ]]% - - - -
- - - - [[ repeatIn(funct_total(data['form']),'b') ]] Total: - - - [[ formatLang(b['tot_theo'], currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_pln'], currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_prac'], currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_perc']) ]]% - - - - - - -
-
-
diff --git a/addons/account_budget/report/budget_report.rml b/addons/account_budget/report/budget_report.rml deleted file mode 100644 index 789c3ed1ffb..00000000000 --- a/addons/account_budget/report/budget_report.rml +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] - - - - Budget - - - - - - - Currency: [[ company.currency_id.name ]] - - - Printed at: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] at [[ time.strftime('%H:%M:%S')]] - - - - - Analysis from [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]] - - - Budget : [[ o.name ]] - - - - - - - - - - - - - Description - - - Theoretical Amt - - - Planned Amt - - - Practical Amt - - - Perc(%) - - - -
- [[ repeatIn(funct(o,data['form']),'a') ]] - - - - [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'], digits=2) ]]% - - - -
- - - - [[ repeatIn(funct_total(data['form']),'b') ]]Total: - - - [[ formatLang(b['tot_theo'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_pln'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_prac'], digits=get_digits(dp='Account'), currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_perc'], digits=2) ]]% - - - - - - -
-
diff --git a/addons/account_budget/report/crossovered_budget_report.rml b/addons/account_budget/report/crossovered_budget_report.rml deleted file mode 100644 index a63920a4c9f..00000000000 --- a/addons/account_budget/report/crossovered_budget_report.rml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] - Budget - - - - - - - Analysis from - - - Budget - - - Currency - - - - - - - [[ formatLang(data['form']['date_from'],date=True) ]] to [[ formatLang(data['form']['date_to'],date=True) ]] - - - [[ o.name ]] - - - [[ company.currency_id.name ]] - - - - - - - - - - Description - - - Theoretical Amt - - - Planned Amt - - - Practical Amt - - - Perc(%) - - - -
- [[ repeatIn(funct(o,data['form']),'a') ]] - - - - [['.....' *(a['status']-1) ]][[ (a['status']==1 and (setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ a['name'] ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['theo'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['pln'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['prac'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ (a['status']==1 and ( setTag('para','para',{'fontName':'Helvetica-Bold'}))) or removeParentNode('font') ]] [[ formatLang(a['perc'],digits=2) ]]% - - - -
- - - - [[ repeatIn(funct_total(data['form']),'b') ]] Total : - - - [[ formatLang(b['tot_theo'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_pln'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_prac'], dp='Account', currency_obj=company.currency_id) ]] - - - [[ formatLang(b['tot_perc'],digits=2) ]]% - - - - - - -
-
diff --git a/addons/account_budget/views/report_analyticaccountbudget.xml b/addons/account_budget/views/report_analyticaccountbudget.xml new file mode 100644 index 00000000000..dab987d6099 --- /dev/null +++ b/addons/account_budget/views/report_analyticaccountbudget.xml @@ -0,0 +1,69 @@ + + + + + + \ No newline at end of file diff --git a/addons/account_budget/views/report_budget.xml b/addons/account_budget/views/report_budget.xml new file mode 100644 index 00000000000..6bc72fc9dca --- /dev/null +++ b/addons/account_budget/views/report_budget.xml @@ -0,0 +1,77 @@ + + + + + + diff --git a/addons/account_budget/views/report_crossoveredbudget.xml b/addons/account_budget/views/report_crossoveredbudget.xml new file mode 100644 index 00000000000..412c2aac8ed --- /dev/null +++ b/addons/account_budget/views/report_crossoveredbudget.xml @@ -0,0 +1,81 @@ + + + + + + diff --git a/addons/account_budget/wizard/account_budget_analytic.py b/addons/account_budget/wizard/account_budget_analytic.py index 90285b90d1e..a58b804ebbf 100644 --- a/addons/account_budget/wizard/account_budget_analytic.py +++ b/addons/account_budget/wizard/account_budget_analytic.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_budget_analytic(osv.osv_memory): _name = 'account.budget.analytic' @@ -30,7 +31,7 @@ class account_budget_analytic(osv.osv_memory): 'date_from': fields.date('Start of period', required=True), 'date_to': fields.date('End of period', required=True), } - _defaults= { + _defaults = { 'date_from': lambda *a: time.strftime('%Y-01-01'), 'date_to': lambda *a: time.strftime('%Y-%m-%d'), } @@ -40,15 +41,11 @@ class account_budget_analytic(osv.osv_memory): context = {} data = self.read(cr, uid, ids, context=context)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.analytic.account', - 'form': data + 'ids': context.get('active_ids', []), + 'model': 'account.analytic.account', + 'form': data } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.analytic.account.budget', - 'datas': datas, - } - + datas['form']['ids'] = datas['ids'] + return self.pool['report'].get_action(cr, uid, ids, 'account_budget.report_analyticaccountbudget', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/wizard/account_budget_crossovered_report.py b/addons/account_budget/wizard/account_budget_crossovered_report.py index 6f89a3cd95c..96561df5af0 100644 --- a/addons/account_budget/wizard/account_budget_crossovered_report.py +++ b/addons/account_budget/wizard/account_budget_crossovered_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_budget_crossvered_report(osv.osv_memory): _name = "account.budget.crossvered.report" @@ -40,16 +41,12 @@ class account_budget_crossvered_report(osv.osv_memory): context = {} data = self.read(cr, uid, ids, context=context)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'crossovered.budget', - 'form': data + 'ids': context.get('active_ids', []), + 'model': 'crossovered.budget', + 'form': data } + datas['form']['ids'] = datas['ids'] datas['form']['report'] = 'analytic-full' - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'crossovered.budget.report', - 'datas': datas, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account_budget.report_crossoveredbudget', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_budget/wizard/account_budget_crossovered_summary_report.py b/addons/account_budget/wizard/account_budget_crossovered_summary_report.py index 6e3131b584c..6b676ecc684 100644 --- a/addons/account_budget/wizard/account_budget_crossovered_summary_report.py +++ b/addons/account_budget/wizard/account_budget_crossovered_summary_report.py @@ -18,10 +18,11 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv + class account_budget_crossvered_summary_report(osv.osv_memory): """ This wizard provides the crossovered budget summary report' @@ -32,7 +33,7 @@ class account_budget_crossvered_summary_report(osv.osv_memory): 'date_from': fields.date('Start of period', required=True), 'date_to': fields.date('End of period', required=True), } - _defaults= { + _defaults = { 'date_from': lambda *a: time.strftime('%Y-01-01'), 'date_to': lambda *a: time.strftime('%Y-%m-%d'), } @@ -42,17 +43,12 @@ class account_budget_crossvered_summary_report(osv.osv_memory): context = {} data = self.read(cr, uid, ids, context=context)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'crossovered.budge', - 'form': data + 'ids': context.get('active_ids',[]), + 'model': 'crossovered.budge', + 'form': data } + datas['form']['ids'] = datas['ids'] datas['form']['report'] = 'analytic-one' - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'crossovered.budget.report', - 'datas': datas, - } - + return self.pool['report'].get_action(cr, uid, ids, 'account_budget.report_crossoveredbudget', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account_budget/wizard/account_budget_report.py b/addons/account_budget/wizard/account_budget_report.py index 54c3180ee0d..2308b5ff9ac 100644 --- a/addons/account_budget/wizard/account_budget_report.py +++ b/addons/account_budget/wizard/account_budget_report.py @@ -18,8 +18,8 @@ # along with this program. If not, see . # ############################################################################## -import time +import time from openerp.osv import fields, osv @@ -31,7 +31,7 @@ class account_budget_report(osv.osv_memory): 'date_from': fields.date('Start of period', required=True), 'date_to': fields.date('End of period', required=True), } - _defaults= { + _defaults = { 'date_from': lambda *a: time.strftime('%Y-01-01'), 'date_to': lambda *a: time.strftime('%Y-%m-%d'), } @@ -41,16 +41,12 @@ class account_budget_report(osv.osv_memory): context = {} data = self.read(cr, uid, ids, context=context)[0] datas = { - 'ids': context.get('active_ids',[]), - 'model': 'account.budget.post', - 'form': data + 'ids': context.get('active_ids', []), + 'model': 'account.budget.post', + 'form': data } - datas['form']['report']='analytic-full' - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.budget', - 'datas': datas, - } - + datas['form']['ids'] = datas['ids'] + datas['form']['report'] = 'analytic-full' + return self.pool['report'].get_action(cr, uid, ids, 'account_budget.report_budget', data=datas, context=context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_check_writing/__openerp__.py b/addons/account_check_writing/__openerp__.py index e01c17d66a7..3311a7c03b3 100644 --- a/addons/account_check_writing/__openerp__.py +++ b/addons/account_check_writing/__openerp__.py @@ -31,10 +31,12 @@ Module for the Check Writing and Check Printing. 'depends' : ['account_voucher'], 'data': [ 'wizard/account_check_batch_printing_view.xml', - 'account_check_writing_report.xml', 'account_view.xml', 'account_voucher_view.xml', 'account_check_writing_data.xml', + 'data/report_paperformat.xml', + 'views/report_check.xml', + 'account_check_writing_report.xml', ], 'demo': ['account_demo.xml'], 'test': [], diff --git a/addons/account_check_writing/account_check_writing_report.xml b/addons/account_check_writing/account_check_writing_report.xml index eece4e4a5da..d32dd77bc8f 100644 --- a/addons/account_check_writing/account_check_writing_report.xml +++ b/addons/account_check_writing/account_check_writing_report.xml @@ -1,29 +1,17 @@ - + - - - - - + + + + diff --git a/addons/account_check_writing/data/report_paperformat.xml b/addons/account_check_writing/data/report_paperformat.xml new file mode 100644 index 00000000000..3782b8bde40 --- /dev/null +++ b/addons/account_check_writing/data/report_paperformat.xml @@ -0,0 +1,20 @@ + + + + + French Bank Check + + custom + 80 + 175 + Portrait + 3 + 3 + 3 + 3 + + 3 + 80 + + + diff --git a/addons/account_check_writing/report/check_print_bottom.rml b/addons/account_check_writing/report/check_print_bottom.rml deleted file mode 100644 index f9add2fe60b..00000000000 --- a/addons/account_check_writing/report/check_print_bottom.rml +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'voucher')]] - - - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Balance Due - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_original'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[formatLang( l['amount_original']) ]] - - - [[ formatLang( l['amount_due']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Balance Due - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_original'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[ formatLang (l['amount_original']) ]] - - - [[ formatLang (l['amount_due']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - - - - - - - - - - - [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - [[ voucher.partner_id.name ]] - [[ display_address(voucher.partner_id) or removeParentNode('para') ]] - - - - - - - [[ fill_stars(voucher.amount_in_word) ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/account_check_writing/report/check_print_middle.rml b/addons/account_check_writing/report/check_print_middle.rml deleted file mode 100644 index b1fffca662d..00000000000 --- a/addons/account_check_writing/report/check_print_middle.rml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'voucher')]] - - - - - - - - - - [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Balance Due - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_original'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[formatLang( l['amount_original']) ]] - - - [[ formatLang( l['amount_due']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - - [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - - - - - - - [[ str(fill_stars(voucher.amount_in_word)) ]] - - - - - - - - - - - - - - - - - - - - - - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - [[ voucher.partner_id.name ]] - [[ display_address(voucher.partner_id) or removeParentNode('para') ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Balance Due - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_original'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[ formatLang (l['amount_original']) ]] - - - [[ formatLang (l['amount_due']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - diff --git a/addons/account_check_writing/report/check_print_top.rml b/addons/account_check_writing/report/check_print_top.rml deleted file mode 100644 index 9a4d633e680..00000000000 --- a/addons/account_check_writing/report/check_print_top.rml +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[repeatIn(objects,'voucher')]] - - - - - - - - - - - - - - - - - - - - - - - - [[ formatLang(voucher.date , date=True) or '' ]] [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - - - - - - [[ voucher.partner_id.name ]] - - - [[ formatLang (voucher.amount) ]] - - - - - - - [[ fill_stars(voucher.amount_in_word) ]] - - - - - - - - - - [[ voucher.partner_id.name ]] - [[ display_address(voucher.partner_id) or removeParentNode('para') ]] - - - - - - - - - - - - - - - [[ voucher.name ]] - - - - - - - - - - - - - - - - - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Open Balance - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_due'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[formatLang( l['amount_original']) ]] - - - [[ formatLang( l['amount_unreconciled']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - - - [[voucher.partner_id.name]] - - - [[ formatLang(voucher.date , date=True) or '' ]] [[ voucher.journal_id.use_preprint_check and voucher.chk_seq or '' ]] - - - - - - - Due Date - - - Description - - - Original Amount - - - Open Balance - - - Discount - - - Payment - - - - - [[ repeatIn(get_lines(voucher.line_dr_ids),'l') ]] [[ formatLang(l['date_due'] ,date=True) or '' ]] - - - [[ l['name'] ]] - - - [[ formatLang (l['amount_original']) ]] - - - [[ formatLang (l['amount_unreconciled']) ]] - - - - - - - - [[ formatLang (l['amount']) ]] - - - - - - - Check Amount - - - [[ formatLang (voucher.amount) ]] - - - - - - - - - - - - - - diff --git a/addons/account_check_writing/views/report_check.xml b/addons/account_check_writing/views/report_check.xml new file mode 100644 index 00000000000..d740de1a0a4 --- /dev/null +++ b/addons/account_check_writing/views/report_check.xml @@ -0,0 +1,48 @@ + + + + + + diff --git a/addons/account_followup/__openerp__.py b/addons/account_followup/__openerp__.py index dbb4ea6583e..61e9ea2d4ae 100644 --- a/addons/account_followup/__openerp__.py +++ b/addons/account_followup/__openerp__.py @@ -55,11 +55,12 @@ Note that if you want to check the follow-up level for a given partner/account e 'account_followup_view.xml', 'account_followup_customers.xml', 'wizard/account_followup_print_view.xml', + 'views/report_followup.xml', + 'account_followup_reports.xml' ], 'demo': ['account_followup_demo.xml'], 'test': [ 'test/account_followup.yml', - #TODO 'test/account_followup_report.yml', --> Need to wait for second step in order to check report (expects after first) ], 'installable': True, 'auto_install': False, diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 9237282ad80..5f912b61b37 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -21,7 +21,7 @@ from openerp.osv import fields, osv from lxml import etree - +import openerp.tools as tools from openerp.tools.translate import _ class followup(osv.osv): @@ -189,11 +189,7 @@ class res_partner(osv.osv): 'model': 'account_followup.followup', 'form': data } - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account_followup.followup.print', - 'datas': datas, - } + return self.pool['report'].get_action(cr, uid, wizard_partner_ids, 'account_followup.report_followup', data=datas, context=context) def do_partner_mail(self, cr, uid, partner_ids, context=None): if context is None: @@ -247,8 +243,7 @@ class res_partner(osv.osv): if partner.unreconciled_aml_ids: company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id current_date = fields.date.context_today(self, cr, uid, context=context) - rml_parse = account_followup_print.report_rappel(cr, uid, "followup_rml_parser") - final_res = rml_parse._lines_get_with_partner(partner, company.id) + final_res = self.pool['report.account_followup.report_followup']._lines_get_with_partner(partner, company.id, cr=cr, uid=uid) for currency_dict in final_res: currency = currency_dict.get('line', [{'currency_id': company.currency_id}])[0]['currency_id'] @@ -274,7 +269,11 @@ class res_partner(osv.osv): strbegin = "" strend = "" followup_table +="" + strbegin + str(aml['date']) + strend + strbegin + aml['name'] + strend + strbegin + aml['ref'] + strend + strbegin + str(date) + strend + strbegin + str(aml['balance']) + strend + strbegin + block + strend + "" - total = rml_parse.formatLang(total, dp='Account', currency_obj=currency) + + total = reduce(lambda x, y: x+y['balance'], currency_dict['line'], 0.00) + + report_obj = self.pool.get('report') + total = report_obj.formatLang(total, dp='Account', currency_obj=currency, cr=cr, uid=uid) followup_table += '''
''' + _("Amount due") + ''' : %s
''' % (total) diff --git a/addons/account_followup/account_followup_reports.xml b/addons/account_followup/account_followup_reports.xml new file mode 100644 index 00000000000..16149a5fd47 --- /dev/null +++ b/addons/account_followup/account_followup_reports.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/addons/account_followup/account_followup_view.xml b/addons/account_followup/account_followup_view.xml index e233feb489e..57f71566db0 100644 --- a/addons/account_followup/account_followup_view.xml +++ b/addons/account_followup/account_followup_view.xml @@ -132,7 +132,6 @@ id="menu_manual_reconcile_followup"/> - account.move.line.partner.tree diff --git a/addons/account_followup/report/account_followup_print.rml b/addons/account_followup/report/account_followup_print.rml deleted file mode 100644 index 6eadaed8675..00000000000 --- a/addons/account_followup/report/account_followup_print.rml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(ids_to_objects(data['form']['partner_ids']),'o') ]] - [[ setLang(o.partner_id.lang) ]] - - - - - - - [[ o.partner_id.name or '' ]] - [[ display_address(o.partner_id) or '']] - - - - VAT: [[ o.partner_id.vat or removeParentNode('para') ]] - - - - - - - Document : Customer account statement - Date : [[ formatLang(data['form']['date'],date=True) ]] - Customer Ref : [[ o.partner_id.ref or '' ]] - - - -
[[ format(get_text(o,data['form']['followup_id'])) ]]
- - - -
- - - [[repeatIn(getLines(o), 'cur_lines') ]] - - - Invoice Date - - - Description - - - Ref - - - Maturity Date - - - Amount - - - Li. - - - - - - [[repeatIn(cur_lines['line'], 'line') ]] - - [[ formatLang(line['date'],date = True) ]] - - - [[ line['name'] ]] - - - [[ line['ref'] ]] - - - [[ line['date_maturity'] and formatLang(line['date_maturity'], date=True) ]] - - - [[ formatLang(line['balance'], currency_obj=line['currency_id']) ]] - - - [[ line['blocked'] and 'X' or '' ]] - - - - - - - - - - - - Total: - - - [[formatLang(reduce(lambda x,y: x+y['balance'], cur_lines['line'], 0.00), currency_obj=line['currency_id']) ]] - - - - - - - - - - - - - - - - - - - -
- -
-
diff --git a/addons/account_followup/tests/test_account_followup.py b/addons/account_followup/tests/test_account_followup.py index 9e70430c518..b3025021278 100644 --- a/addons/account_followup/tests/test_account_followup.py +++ b/addons/account_followup/tests/test_account_followup.py @@ -59,7 +59,6 @@ class TestAccountFollowup(TransactionCase): self.wizard.do_process(cr, uid, [self.wizard_id], context={"followup_id": self.followup_id}) self.assertFalse(self.partner.browse(cr, uid, self.partner_id).latest_followup_level_id) - def run_wizard_three_times(self): cr, uid = self.cr, self.uid current_date = datetime.datetime.utcnow() @@ -131,7 +130,7 @@ class TestAccountFollowup(TransactionCase): self.run_wizard_three_times() self.assertEqual(self.partner.browse(cr, uid, self.partner_id).latest_followup_level_id.id, self.last_followup_line_id, "Lines are not equal") - + def test_06_pay_the_invoice(self): """Run wizard until manual action, pay the invoice and check that partner has no follow-up level anymore and after running the wizard the action is empty""" cr, uid = self.cr, self.uid @@ -148,7 +147,6 @@ class TestAccountFollowup(TransactionCase): 'followup_id': self.followup_id }, context={"followup_id": self.followup_id}) self.wizard.do_process(cr, uid, [self.wizard_id], context={"followup_id": self.followup_id}) - partner_ref = self.partner.browse(cr, uid, self.partner_id) self.assertEqual(0, self.partner.browse(cr, uid, self.partner_id).payment_amount_due, "Amount Due != 0") self.assertFalse(self.partner.browse(cr, uid, self.partner_id).payment_next_action_date, "Next action date not cleared") diff --git a/addons/account_followup/views/report_followup.xml b/addons/account_followup/views/report_followup.xml new file mode 100644 index 00000000000..6c79fe4cc55 --- /dev/null +++ b/addons/account_followup/views/report_followup.xml @@ -0,0 +1,58 @@ + + + + + + diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index 4c3c8f045e3..c5cccc38c26 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -54,6 +54,8 @@ have a new option to import payment orders as bank statement lines. 'account_payment_workflow.xml', 'account_payment_sequence.xml', 'account_payment_report.xml', + + 'views/report_paymentorder.xml', ], 'demo': ['account_payment_demo.xml'], 'test': [ diff --git a/addons/account_payment/account_payment_report.xml b/addons/account_payment/account_payment_report.xml index 699207e1733..3a57abe901f 100644 --- a/addons/account_payment/account_payment_report.xml +++ b/addons/account_payment/account_payment_report.xml @@ -1,6 +1,13 @@ - + diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml deleted file mode 100644 index 02675baf0b2..00000000000 --- a/addons/account_payment/report/order.rml +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Partner - - - Bank Account - - - Invoice Ref - - - Value Date - - - Amount - - - Currency - - - - - [[ repeatIn(objects, 'o') ]] - - - - - - - - - - - - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.name or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.street2 or removeParentNode('para')]] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.zip or '']] [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.city or '']] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.state and o.mode.bank_id.bank.state.name or removeParentNode('para') ]] - [[ o.mode and o.mode.bank_id.bank and o.mode.bank_id.bank.country and o.mode.bank_id.bank.country.name or '']] - - - - - - - Payment Order / Payment - - - - - - - Payment Type - - - Reference - - - Used Account - - - Execution Type - - - Company Currency - - - - - - - [[ o.mode and o.mode.name or '-' ]] - - - [[ o.reference or '-' ]] - - - [[get_account_name(o.mode.bank_id.id)]] - - - [[ o.date_prefered == 'now' and 'Now' or removeParentNode('para') ]] - [[ o.date_prefered == 'due' and 'Due date' or removeParentNode('para') ]] - [[ o.date_prefered == 'fixed' and 'Fixed date' or removeParentNode('para') ]] - - - [[ o.user_id and o.user_id.company_id and o.user_id.company_id.currency_id and o.user_id.company_id.currency_id.name or '' ]] - - - - - - - - - - Partner - - - Bank Account - - - Invoice Ref - - - Value Date - - - Amount - - - Currency - - - -
- [[repeatIn(o.line_ids, 'line') ]] - - - - [[line.partner_id and line.partner_id.name or '-' ]] - - - [[get_account_name(line.bank_id.id) or '-']] - - - [[ get_invoice_name(line.ml_inv_ref.id) or '-' ]] - - - [[not line.date and '-' or formatLang(line.date,date=True) ]] - - - [[ formatLang(line.amount or 0.0, currency_obj=line.company_currency) ]] - - - [[ formatLang(line.amount_currency, currency_obj=line.currency) ]] - - - -
- - - - - - - - - Total: - - - [[ formatLang(get_amount_total(o), currency_obj=o.company_id.currency_id) or '' ]] - - - [[ formatLang(get_amount_total_in_currency(o), currency_obj=(o.line_ids and o.line_ids[0].currency or None)) or '' ]] - - - - - - -
-
-
diff --git a/addons/account_payment/views/report_paymentorder.xml b/addons/account_payment/views/report_paymentorder.xml new file mode 100644 index 00000000000..c2662b6aa77 --- /dev/null +++ b/addons/account_payment/views/report_paymentorder.xml @@ -0,0 +1,104 @@ + + + + + + diff --git a/addons/account_test/__openerp__.py b/addons/account_test/__openerp__.py index cfd4007fed0..51b47bace7a 100644 --- a/addons/account_test/__openerp__.py +++ b/addons/account_test/__openerp__.py @@ -19,11 +19,12 @@ # along with this program. If not, see . # ############################################################################## + { - 'name' : 'Accounting Consistency Tests', - 'version' : '1.0', - 'author' : 'OpenERP', - 'category' : 'Accounting & Finance', + 'name': 'Accounting Consistency Tests', + 'version': '1.0', + 'author': 'OpenERP', + 'category': 'Accounting & Finance', 'website': 'http://www.openerp.com', 'description': """ Asserts on accounting. @@ -34,14 +35,16 @@ You can write a query in order to create Consistency Test and you will get the r in PDF format which can be accessed by Menu Reporting -> Accounting Tests, then select the test and print the report from Print button in header area. """, - 'depends' : ['account'], - 'data' : [ + 'depends': ['account'], + 'data': [ 'security/ir.model.access.csv', 'account_test_view.xml', 'account_test_report.xml', 'account_test_data.xml', + 'views/report_accounttest.xml', ], 'active': False, 'installable': True } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_test/account_test_report.xml b/addons/account_test/account_test_report.xml index 480507b6072..732b9e9fbdb 100644 --- a/addons/account_test/account_test_report.xml +++ b/addons/account_test/account_test_report.xml @@ -1,14 +1,13 @@ - - - - - + + + diff --git a/addons/account_test/report/account_test.rml b/addons/account_test/report/account_test.rml deleted file mode 100644 index 1efa12fd5cb..00000000000 --- a/addons/account_test/report/account_test.rml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Accouting tests on [[ datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") ]] - - - -
- [[repeatIn(objects,'o')]] - - - - [[ o.name ]] - - - - - [[ o.desc or '' ]] - - - - - - - [[ repeatIn(execute_code(o.code_exec), 'test_result') ]] - [[ test_result ]] - - - - - - -
- -
-
diff --git a/addons/account_test/views/report_accounttest.xml b/addons/account_test/views/report_accounttest.xml new file mode 100644 index 00000000000..02ce82218dc --- /dev/null +++ b/addons/account_test/views/report_accounttest.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/addons/account_voucher/__openerp__.py b/addons/account_voucher/__openerp__.py index 0659e4f4bae..6a3b0ee81cd 100644 --- a/addons/account_voucher/__openerp__.py +++ b/addons/account_voucher/__openerp__.py @@ -49,7 +49,6 @@ This module manages: 'security/ir.model.access.csv', 'account_voucher_sequence.xml', 'account_voucher_workflow.xml', - 'account_voucher_report.xml', 'wizard/account_statement_from_invoice_view.xml', 'account_voucher_view.xml', 'voucher_payment_receipt_view.xml', @@ -59,6 +58,7 @@ This module manages: 'report/account_voucher_sales_receipt_view.xml', 'security/account_voucher_security.xml', 'account_voucher_data.xml', + 'account_voucher_report.xml', ], 'test' : [ 'test/account_voucher_users.yml', @@ -66,7 +66,6 @@ This module manages: 'test/account_voucher.yml', 'test/sales_receipt.yml', 'test/sales_payment.yml', - 'test/account_voucher_report.yml', 'test/case1_usd_usd.yml', 'test/case1_usd_usd_payment_rate.yml', 'test/case2_usd_eur_debtor_in_eur.yml', @@ -74,6 +73,7 @@ This module manages: 'test/case3_eur_eur.yml', 'test/case4_cad_chf.yml', 'test/case_eur_usd.yml', + 'account_voucher_report.yml', ], 'auto_install': False, 'application': True, diff --git a/addons/account_voucher/report/account_voucher.rml b/addons/account_voucher/report/account_voucher.rml deleted file mode 100644 index 6b3337aa64f..00000000000 --- a/addons/account_voucher/report/account_voucher.rml +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'voucher') ]] - - - - [[ get_title(voucher.type) ]] - - - - - - - - - - Journal: - - - [[ voucher.type ]] - - - Number: - - - [[ voucher.number ]] - - - - - - - Status: - - - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - Ref. : - - - [[ voucher.reference or '' ]] - - - Date: - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - - - - - - - - Particulars - - - Debit - - - Credit - - - - - - -
- [[ repeatIn(voucher.move_ids,'move_ids') ]] - - - - [[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] - - - [[ formatLang(move_ids.debit) ]] - - - [[ formatLang(move_ids.credit) ]] - - - - - [[ move_ids.account_id.name ]] - - - - - - - - - - - - - - - [[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]] - - - - - - - - - - - - - - - - -
- - - - - - - Through : - - - - - - - - - - - - - - - [[ voucher.narration or '']] - - - - - - - - - - - - - - - On Account of : - - - - - - - - - - - - - - - [[ voucher.name ]] - - - - - - - - - - - - - - - Amount (in words) : - - - - - - - - - - - - - - - [[ convert(voucher.amount,voucher.currency_id.name) ]] - - - - - - - - - - - - - - - - - - - - - - - - - [[ debit(voucher.move_ids)]] - - - [[ credit(voucher.move_ids) ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Receiver's Signature - - - - - - - - - - - - - Authorised Signatory - - - - - - -
-
diff --git a/addons/account_voucher/report/account_voucher_print.rml b/addons/account_voucher/report/account_voucher_print.rml deleted file mode 100644 index 9f0f2e1f07e..00000000000 --- a/addons/account_voucher/report/account_voucher_print.rml +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'voucher') ]] - - - - [[ get_title(voucher.type) ]] - - - - - - - - - - Number: - - - [[ voucher.number ]] - - - - - - - - - - - - - Date: - - - [[ formatLang(voucher.date , date=True) or '' ]] - - - - - - - Status: - - - PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]] - Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]] - Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]] - Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]] - - - - - - - - - - - - - Currency: - - - [[ voucher.currency_id.symbol ]] - - - - - - - - - - Particulars - - - Amount - - - - - - -
- [[ repeatIn(get_lines(voucher),'p') ]] - - - - Account : - - - - - - - - - - [[ p['pname'] ]] - - - [[ formatLang(p['amount'], currency_obj=voucher.currency_id) ]] - - - - - [[ p['ref'] ]] - - - - - - - - - - Account : [[ p['aname'] ]] - - - - - - - - - - - -
- - - - - - - Through : - - - - - - - - - - [[ voucher.journal_id.name or '' ]] - - - - - - - - - - On Account of : - - - - - - - - - - [[ get_on_account(voucher) ]] - - - - - - - - - - Amount (in words) : - - - - - - - - - - [[ convert(voucher.amount,voucher.currency_id.name) ]] - - - - - - - - - - - - - - - - - - - - [[ formatLang(voucher.amount, currency_obj=voucher.currency_id) ]] - - - -
-
diff --git a/addons/report/controllers/main.py b/addons/report/controllers/main.py index 5cff7b4aae2..f8435ba8245 100644 --- a/addons/report/controllers/main.py +++ b/addons/report/controllers/main.py @@ -143,12 +143,17 @@ class ReportController(Controller): elif value.lower() == 'true': param[key] = True elif ',' in value: - param[key] = [int(i) for i in value.split(',')] + try: + param[key] = [int(i) for i in value.split(',')] + except ValueError: + param[key] = value.split(',') + if len(param[key]) == 1: + param[key] = value else: try: param[key] = int(value) except (ValueError, TypeError): - pass + continue else: if isinstance(param, (str, unicode)): param = [int(i) for i in param.split(',')] diff --git a/addons/report/models/report.py b/addons/report/models/report.py index 8abe8e544eb..b93bbe09f89 100644 --- a/addons/report/models/report.py +++ b/addons/report/models/report.py @@ -74,7 +74,7 @@ class Report(osv.Model): # Extension of ir_ui_view.render with arguments frequently used in reports #-------------------------------------------------------------------------- - def _get_digits(self, cr, uid, obj=None, f=None, dp=None): + def _get_digits(self, cr=None, uid=None, obj=None, f=None, dp=None): d = DEFAULT_DIGITS = 2 if dp: decimal_precision_obj = self.pool['decimal.precision'] @@ -118,6 +118,14 @@ class Report(osv.Model): def get_date_length(date_format=DEFAULT_SERVER_DATE_FORMAT): return len((datetime.now()).strftime(date_format)) + # In case we use formatLang on the model (and not in the rendering environment). + if not hasattr(self, 'land_ditct'): + self.localcontext = {} + self.lang_dict = {} + self.default_lang = {} + self._get_lang_dict(cr, uid) + self.lang_dict_called = True + if digits is None: if dp: digits = self._get_digits(cr, uid, dp=dp) @@ -212,7 +220,7 @@ class Report(osv.Model): values.update({ 'time': time, 'formatLang': partial(self.formatLang, cr=cr, uid=uid), - 'get_digits': self._get_digits, + 'get_digits': partial(self._get_digits, cr=cr, uid=uid), 'render_doc': render_doc, 'editable': True, # Will active inherit_branding 'res_company': self.pool['res.users'].browse(cr, uid, uid).company_id, @@ -377,7 +385,7 @@ class Report(osv.Model): ) return pdf - def get_action(self, cr, uid, ids, report_name, datas=None, context=None): + def get_action(self, cr, uid, ids, report_name, data=None, context=None): """Return an action of type ir.actions.report.xml. :param report_name: Name of the template to generate an action for @@ -386,8 +394,8 @@ class Report(osv.Model): if context is None: context = {} - if datas is None: - datas = {} + if data is None: + data = {} report_obj = self.pool.get('ir.actions.report.xml') idreport = report_obj.search(cr, uid, [('report_name', '=', report_name)], context=context) @@ -405,8 +413,8 @@ class Report(osv.Model): 'report_file': report.report_file, } - if datas: - action['datas'] = datas + if data: + action['datas'] = data return action @@ -566,8 +574,8 @@ class Report(osv.Model): command_args.extend(['--page-size', paperformat.format]) if paperformat.page_height and paperformat.page_width and paperformat.format == 'custom': - command_args.extend(['--page-width', str(paperformat.page_width) + 'in']) - command_args.extend(['--page-height', str(paperformat.page_height) + 'in']) + command_args.extend(['--page-width', str(paperformat.page_width) + 'mm']) + command_args.extend(['--page-height', str(paperformat.page_height) + 'mm']) if specific_paperformat_args and specific_paperformat_args['data-report-margin-top']: command_args.extend(['--margin-top', diff --git a/addons/report/models/report_paperformat.py b/addons/report/models/report_paperformat.py index e3e747b81a4..6b84f3d3363 100644 --- a/addons/report/models/report_paperformat.py +++ b/addons/report/models/report_paperformat.py @@ -69,8 +69,8 @@ class report_paperformat(osv.Model): 'margin_bottom': fields.integer('Bottom Margin (mm)'), 'margin_left': fields.integer('Left Margin (mm)'), 'margin_right': fields.integer('Right Margin (mm)'), - 'page_height': fields.integer('Page height (in)'), - 'page_width': fields.integer('Page width (in)'), + 'page_height': fields.integer('Page height (mm)'), + 'page_width': fields.integer('Page width (mm)'), 'orientation': fields.selection([('Landscape', 'Landscape'), ('Portrait', 'Portrait')], 'Orientation'), diff --git a/addons/report/views/layouts.xml b/addons/report/views/layouts.xml index 588775fc41e..721176738cb 100644 --- a/addons/report/views/layouts.xml +++ b/addons/report/views/layouts.xml @@ -6,7 +6,10 @@ + t-att-data-main-object="repr(main_object) if editable else None" + t-att-data-report-margin-top="data_report_margin_top if data_report_margin_top else None" + t-att-data-report-header-spacing="data_report_header_spacing if t_att_data_report_header_spacing else None" + t-att-data-report-dpi="data_report_dpi if data_report_dpi else None"> @@ -158,5 +161,6 @@ + diff --git a/addons/report_intrastat/__init__.py b/addons/report_intrastat/__init__.py index d2f598434a2..119777f2c70 100644 --- a/addons/report_intrastat/__init__.py +++ b/addons/report_intrastat/__init__.py @@ -20,7 +20,5 @@ ############################################################################## import report_intrastat -import report # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/report_intrastat/__openerp__.py b/addons/report_intrastat/__openerp__.py index 0fa57977db1..4682a777ccc 100644 --- a/addons/report_intrastat/__openerp__.py +++ b/addons/report_intrastat/__openerp__.py @@ -19,7 +19,6 @@ # ############################################################################## - { 'name': 'Intrastat Reporting', 'version': '1.0', @@ -37,7 +36,8 @@ European Union.""", 'security/ir.model.access.csv', 'report_intrastat_view.xml', 'intrastat_report.xml', - 'report_intrastat_data.xml' + 'report_intrastat_data.xml', + 'views/report_intrastatinvoice.xml' ], 'demo': [], 'test': ['test/report_intrastat_report.yml'], @@ -45,4 +45,5 @@ European Union.""", 'auto_install': False, 'images': ['images/country_intrastat_code.jpeg','images/intrastat_code.jpeg'], } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/intrastat_report.xml b/addons/report_intrastat/intrastat_report.xml index 124cf899efb..c5a8e9e7f84 100644 --- a/addons/report_intrastat/intrastat_report.xml +++ b/addons/report_intrastat/intrastat_report.xml @@ -1,13 +1,13 @@ - - - + + + - - diff --git a/addons/report_intrastat/report/__init__.py b/addons/report_intrastat/report/__init__.py deleted file mode 100644 index 64e530bc278..00000000000 --- a/addons/report_intrastat/report/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -import invoice -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/report/invoice.py b/addons/report_intrastat/report/invoice.py deleted file mode 100644 index c38a62774ac..00000000000 --- a/addons/report_intrastat/report/invoice.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import time -from openerp.report import report_sxw - -class account_invoice_intrastat(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(account_invoice_intrastat, self).__init__(cr, uid, name, context=context) - self.total=0 - self.localcontext.update({ - 'time': time, - }) - -report_sxw.report_sxw('report.account.invoice.intrastat', 'account.invoice', 'addons/report_intrastat/report/invoice.rml', parser=account_invoice_intrastat) - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/report_intrastat/report/invoice.rml b/addons/report_intrastat/report/invoice.rml deleted file mode 100644 index fc410e04ce0..00000000000 --- a/addons/report_intrastat/report/invoice.rml +++ /dev/null @@ -1,401 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects,'o') ]] - [[ setLang(o.partner_id.lang) ]] - - - - - - - - - [[ (o.partner_id.title and o.partner_id.title.name) or '' ]] [[ (o.partner_id and o.partner_id.name) or '' ]] - [[ o.partner_id and display_address(o.partner_id) ]] - - - - Tel. : [[ (o.partner_id.phone) or removeParentNode('para') ]] - Fax : [[ (o.partner_id.fax) or removeParentNode('para') ]] - VAT : [[ (o.partner_id.vat) or removeParentNode('para') ]] - - - - Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]] - PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]] - Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]] - Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]] - Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]] - Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]] - - - - - - - Document - - - Invoice Date - - - Partner Ref. - - - - - - - [[ o.name or ' ' ]] - - - [[ formatLang(o.date_invoice,date=True) ]] - - - [[ (o.partner_id.ref) or ' ' ]] - - - - - - - - - - Description - - - Taxes - - - Intrastat - - - Weight - - - Quantity - - - Unit Price - - - Disc. (%) - - - Price - - - -
- [[ repeatIn(o.invoice_line,'l') ]] - - - - [[ l.name ]] - - - [[ ', '.join([lt.name for lt in l.invoice_line_tax_id]) ]] - - - [[l.product_id and l.product_id.intrastat_id and l.product_id.intrastat_id.name or '']] - - - [[ l.product_id and l.product_id.weight or '']] - - - [[ formatLang(l.quantity) ]] [[ (l.uos_id and l.uos_id.name) or '' ]] - - - [[ formatLang(l.price_unit) ]] - - - [[ l.discount and formatLang (l.discount) or '' ]] - - - [[ formatLang(l.price_subtotal, currency_obj=o.currency_id) ]] - - - - - [[ format(l.note or removeParentNode('tr')) ]] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - Total (excl. taxes): - - - [[ formatLang(o.amount_untaxed, currency_obj=o.currency_id) ]] - - - - - - - - - - Taxes: - - - [[ formatLang(o.amount_tax, currency_obj=o.currency_id) ]] - - - - - - - - - - Total (inclu. taxes): - - - [[ formatLang(o.amount_total, currency_obj=o.currency_id) ]] - - - - - - - - - - Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]] - - - Base - - - Amount - - - - - - - - -
- [[ repeatIn(o.tax_line,'t') ]] - - - - [[ t.name ]] - - - [[ formatLang(t.base, digits=get_digits(dp='Account'), currency_obj = o.currency_id) ]] - - - [[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]] - - - - - - - - -
- - - - [[ (o.comment and format(o.comment )) or removeParentNode('para') ]] - - - - [[ (o.payment_term and o.payment_term.note and format(o.payment_term and o.payment_term.note)) or removeParentNode('para') ]] - - - - - - - Fiscal Position Remark : - - - [[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]] - - - - - - -
-
diff --git a/addons/report_intrastat/views/report_intrastatinvoice.xml b/addons/report_intrastat/views/report_intrastatinvoice.xml new file mode 100644 index 00000000000..e8bce6e952d --- /dev/null +++ b/addons/report_intrastat/views/report_intrastatinvoice.xml @@ -0,0 +1,149 @@ + + + + + + + +