\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-04 06:59+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-27 06:34+0000\n"
+"X-Generator: Launchpad (build 16967)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@@ -306,9 +306,9 @@ msgstr ""
"\n"
" 点击创建一个客户退款. \n"
"
\n"
-" 退款是全部或部分借记销售传票的证明。\n"
+" 退款是全部或部分借记销售发票的证明。\n"
"
\n"
-" 可以直接从与客户相关联的传票直接生成退款,以代替手工创建客户退款。.\n"
+" 可以直接从与客户相关联的发票直接生成退款,以代替手工创建客户退款。.\n"
"
\n"
" "
@@ -436,7 +436,7 @@ msgid ""
msgstr ""
"此处可以管理属于公司或者个人的资产.\n"
" 跟踪资产折旧的发生,创建折旧明细账户。.\n"
-" 要安装account_asset模块. 如果不检查box, 可以处理传票和付款,\n"
+" 要安装account_asset模块. 如果不检查box, 可以处理发票和付款,\n"
" 但不能处理账记(分录明细, 科目表, ...)"
#. module: account
@@ -804,7 +804,7 @@ msgstr "打印发票"
msgid ""
"Cannot %s invoice which is already reconciled, invoice should be "
"unreconciled first. You can only refund this invoice."
-msgstr "不能 %s 已经核销的发票, 发票必须被首先反核销.。只能退还这张发票。"
+msgstr "不能 %s 已经核销的发票, 发票必须被首先反核销。只能退还这张发票。"
#. module: account
#: selection:account.financial.report,display_detail:0
@@ -1428,7 +1428,7 @@ msgstr "级别"
#: code:addons/account/wizard/account_change_currency.py:38
#, python-format
msgid "You can only change currency for Draft Invoice."
-msgstr "您只能修改发票草稿的货币。"
+msgstr "您只能修改发票草稿的币种。"
#. module: account
#: report:account.invoice:0
@@ -1629,12 +1629,12 @@ msgstr "未执行。"
#. module: account
#: view:account.invoice.refund:0
msgid "Credit Note"
-msgstr "冲销传票"
+msgstr "冲销发票"
#. module: account
#: view:account.config.settings:0
msgid "eInvoicing & Payments"
-msgstr "电子传票和支付"
+msgstr "电子发票和支付"
#. module: account
#: view:account.analytic.cost.ledger.journal.report:0
@@ -1662,7 +1662,7 @@ msgstr "用于仪表盘视图的临时表"
#: model:ir.actions.act_window,name:account.action_invoice_tree4
#: model:ir.ui.menu,name:account.menu_action_invoice_tree4
msgid "Supplier Refunds"
-msgstr "供应商红字传票"
+msgstr "供应商红字发票"
#. module: account
#: field:account.tax.code,code:0
@@ -1858,7 +1858,7 @@ msgstr "15 天"
#. module: account
#: model:ir.ui.menu,name:account.periodical_processing_invoicing
msgid "Invoicing"
-msgstr "开传票"
+msgstr "开发票"
#. module: account
#: code:addons/account/report/account_partner_balance.py:115
@@ -2156,6 +2156,11 @@ msgid ""
" \n"
" "
msgstr ""
+"点击登记银行对账单\n"
+"银行对账单是一个银行帐户在一定会计期间所发生的全部交易往来的汇总。你可以从银行周期性获得。\n"
+"
\n"
+"OpenERP允许对账单行直接和相关的销售或采购发票进行核销。\n"
+" "
#. module: account
#: field:account.config.settings,currency_id:0
@@ -2437,7 +2442,7 @@ msgstr "检查供应商发票合计"
#: selection:account.invoice.report,state:0
#: selection:report.invoice.created,state:0
msgid "Pro-forma"
-msgstr "形式传票"
+msgstr "形式发票"
#. module: account
#: help:account.account.template,type:0
@@ -2593,7 +2598,7 @@ msgstr "当账目记录有数据时,您将不能把它由关闭状态改变到
#. module: account
#: field:account.invoice.report,account_line_id:0
msgid "Account Line"
-msgstr "传票明细"
+msgstr "发票明细"
#. module: account
#: view:account.addtmpl.wizard:0
@@ -2609,8 +2614,8 @@ msgid ""
"amount greater than the total invoiced amount. In order to avoid rounding "
"issues, the latest line of your payment term must be of type 'balance'."
msgstr ""
-"无法创建传票。\n"
-"相关的支付记录可能未确认核实,因为合计的总额大于传票的开票总额。为避免统计错误,请您确认最新的支付记录都在平衡状态。"
+"无法创建发票。\n"
+"相关的支付记录可能未确认核实,因为合计的总额大于发票的开票总额。为避免统计错误,请您确认最新的支付记录都在平衡状态。"
#. module: account
#: view:account.move:0
@@ -3329,7 +3334,7 @@ msgstr "搜寻会计周期"
#. module: account
#: view:account.change.currency:0
msgid "Invoice Currency"
-msgstr "发票币别"
+msgstr "发票币种"
#. module: account
#: field:accounting.report,account_report_id:0
@@ -4005,7 +4010,7 @@ msgstr "如果您不选择会计期间,它将取所有开启的会计期间"
#. module: account
#: model:ir.model,name:account.model_account_journal_cashbox_line
msgid "account.journal.cashbox.line"
-msgstr ""
+msgstr "account.journal.cashbox.line"
#. module: account
#: model:ir.model,name:account.model_account_partner_reconcile_process
@@ -4186,7 +4191,7 @@ msgstr "应付账"
#: code:addons/account/wizard/account_fiscalyear_close.py:88
#, python-format
msgid "The periods to generate opening entries cannot be found."
-msgstr ""
+msgstr "要生成分录的 会计区间没有找到。"
#. module: account
#: model:process.node,name:account.process_node_supplierpaymentorder0
@@ -4251,7 +4256,7 @@ msgstr "还没有配置好公司"
#. module: account
#: field:res.company,expects_chart_of_accounts:0
msgid "Expects a Chart of Accounts"
-msgstr ""
+msgstr "预计一个会计科目表"
#. module: account
#: field:account.move.line,date:0
@@ -4472,7 +4477,7 @@ msgstr "辅助核算余额"
msgid ""
"This payment term will be used instead of the default one for sale orders "
"and customer invoices"
-msgstr ""
+msgstr "该付款方式将代替销售记录和客户发票的默认值。"
#. module: account
#: view:account.config.settings:0
@@ -4496,7 +4501,7 @@ msgstr "已记账分录明细"
#. module: account
#: field:account.move.line,blocked:0
msgid "No Follow-up"
-msgstr ""
+msgstr "未跟进"
#. module: account
#: view:account.tax.template:0
@@ -4583,6 +4588,8 @@ msgid ""
"Error!\n"
"You cannot create recursive Tax Codes."
msgstr ""
+"错误!\n"
+"你不能循环创建税代码"
#. module: account
#: constraint:account.period:0
@@ -4590,6 +4597,8 @@ msgid ""
"Error!\n"
"The duration of the Period(s) is/are invalid."
msgstr ""
+"错误!\n"
+"这个会计期间的持续时间不合法。"
#. module: account
#: field:account.entries.report,month:0
@@ -4606,7 +4615,7 @@ msgstr "月份"
#: code:addons/account/account.py:668
#, python-format
msgid "You cannot change the code of account which contains journal items!"
-msgstr ""
+msgstr "你不能改变已经包含了账簿项目的 科目代码!"
#. module: account
#: field:account.config.settings,purchase_sequence_prefix:0
@@ -4627,7 +4636,7 @@ msgstr ""
#: view:analytic.entries.report:0
#: field:analytic.entries.report,product_uom_id:0
msgid "Product Unit of Measure"
-msgstr ""
+msgstr "产品计量单位"
#. module: account
#: field:res.company,paypal_account:0
@@ -4682,7 +4691,7 @@ msgstr "税基编码"
#, python-format
msgid ""
"You have to provide an account for the write off/exchange difference entry."
-msgstr ""
+msgstr "你必须提供一个科目来勾销/兑换凭证差异。"
#. module: account
#: help:res.company,paypal_account:0
@@ -4736,7 +4745,7 @@ msgstr ""
#. module: account
#: selection:account.move.line,state:0
msgid "Balanced"
-msgstr ""
+msgstr "已平衡"
#. module: account
#: model:process.node,note:account.process_node_importinvoice0
@@ -4749,7 +4758,7 @@ msgstr "发票或付款清单"
msgid ""
"There is currently no company without chart of account. The wizard will "
"therefore not be executed."
-msgstr ""
+msgstr "目前还没有公司缺少科目表。因此,该向导不会被执行。"
#. module: account
#: model:ir.actions.act_window,name:account.action_wizard_multi_chart
@@ -4764,7 +4773,7 @@ msgstr "科目一览表"
#. module: account
#: field:account.invoice,reference_type:0
msgid "Payment Reference"
-msgstr ""
+msgstr "付款参考"
#. module: account
#: selection:account.financial.report,style_overwrite:0
@@ -4833,7 +4842,7 @@ msgstr "欠款单据"
#: view:account.move.line:0
#: model:ir.actions.act_window,name:account.action_account_manual_reconcile
msgid "Journal Items to Reconcile"
-msgstr ""
+msgstr "待调整日记账"
#. module: account
#: model:ir.model,name:account.model_account_tax_template
@@ -5771,7 +5780,7 @@ msgstr "税编码"
#: selection:account.invoice.report,type:0
#: selection:report.invoice.created,type:0
msgid "Customer Refund"
-msgstr "客户红字传票"
+msgstr "客户红字发票"
#. module: account
#: field:account.tax,ref_tax_sign:0
@@ -6295,7 +6304,7 @@ msgstr "无"
#: model:ir.actions.act_window,name:account.action_invoice_tree3
#: model:ir.ui.menu,name:account.menu_action_invoice_tree3
msgid "Customer Refunds"
-msgstr "客户红字传票"
+msgstr "客户红字发票"
#. module: account
#: field:account.account,foreign_balance:0
@@ -6806,7 +6815,7 @@ msgstr "你不能修改已经存在凭证的公司帐户。"
#: selection:report.invoice.created,type:0
#, python-format
msgid "Supplier Refund"
-msgstr "供应商红字传票"
+msgstr "供应商红字发票"
#. module: account
#: field:account.bank.statement,move_line_ids:0
@@ -7367,7 +7376,7 @@ msgstr ""
#. module: account
#: model:process.transition,note:account.process_transition_invoicemanually0
msgid "A statement with manual entries becomes a draft statement."
-msgstr "手工输入的传票是草稿状态"
+msgstr "手工输入的发票是草稿状态"
#. module: account
#: view:account.aged.trial.balance:0
@@ -7723,7 +7732,7 @@ msgstr "发票明细"
#. module: account
#: view:account.invoice.report:0
msgid "Customer And Supplier Refunds"
-msgstr "客户和供应商红字传票"
+msgstr "客户和供应商红字发票"
#. module: account
#: field:account.financial.report,sign:0
@@ -7766,7 +7775,7 @@ msgstr "OPEJ"
#: report:account.invoice:0
#: view:account.invoice:0
msgid "PRO-FORMA"
-msgstr "形式传票"
+msgstr "形式发票"
#. module: account
#: selection:account.entries.report,move_line_state:0
@@ -8381,7 +8390,7 @@ msgstr "如果在计算未来的税前这税额必须包含在税基金额里,
#: code:addons/account/account.py:3196
#, python-format
msgid "Purchase Refund Journal"
-msgstr "采购红字传票账簿"
+msgstr "采购红字发票账簿"
#. module: account
#: code:addons/account/account.py:1333
@@ -8698,7 +8707,7 @@ msgstr "关闭一个会计年度"
#. module: account
#: field:account.invoice.refund,journal_id:0
msgid "Refund Journal"
-msgstr "红字传票账簿"
+msgstr "红字发票账簿"
#. module: account
#: report:account.account.balance:0
@@ -8937,7 +8946,7 @@ msgstr ""
#. module: account
#: model:res.groups,name:account.group_account_invoice
msgid "Invoicing & Payments"
-msgstr "传票与付款"
+msgstr "发票与付款"
#. module: account
#: help:account.invoice,internal_number:0
@@ -9182,7 +9191,7 @@ msgstr ""
#: code:addons/account/account.py:3195
#, python-format
msgid "Sales Refund Journal"
-msgstr "销售红字传票账簿"
+msgstr "销售红字发票账簿"
#. module: account
#: view:account.move:0
diff --git a/addons/account/i18n/zh_HK.po b/addons/account/i18n/zh_HK.po
index b3fbcee87f2..abef89fa277 100644
--- a/addons/account/i18n/zh_HK.po
+++ b/addons/account/i18n/zh_HK.po
@@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-04 06:57+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-27 06:31+0000\n"
+"X-Generator: Launchpad (build 16967)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
diff --git a/addons/account/i18n/zh_TW.po b/addons/account/i18n/zh_TW.po
index 86d713e23b3..2965f29dc14 100644
--- a/addons/account/i18n/zh_TW.po
+++ b/addons/account/i18n/zh_TW.po
@@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2014-03-04 06:58+0000\n"
-"X-Generator: Launchpad (build 16948)\n"
+"X-Launchpad-Export-Date: 2014-03-27 06:33+0000\n"
+"X-Generator: Launchpad (build 16967)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
diff --git a/addons/account/installer.py b/addons/account/installer.py
index 961b8f9e763..343e22a7632 100644
--- a/addons/account/installer.py
+++ b/addons/account/installer.py
@@ -47,7 +47,7 @@ class account_installer(osv.osv_memory):
# try get the list on apps server
try:
- apps_server = self.pool.get('ir.config_parameter').get_param(cr, uid, 'apps.server', 'https://apps.openerp.com')
+ apps_server = self.pool.get('ir.module.module').get_apps_server(cr, uid, context=context)
up = urlparse.urlparse(apps_server)
url = '{0.scheme}://{0.netloc}/apps/charts?serie={1}'.format(up, serie)
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/account_journal.py b/addons/account/project/report/account_journal.py
deleted file mode 100644
index 50f98fd0ee0..00000000000
--- a/addons/account/project/report/account_journal.py
+++ /dev/null
@@ -1,49 +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
-
-#
-# Use period and Journal for selection or resources
-#
-class journal_print(report_sxw.rml_parse):
- def lines(self, journal_id, *args):
- self.cr.execute('select id from account_analytic_line where journal_id=%s order by date,id', (journal_id,))
- ids = map(lambda x: x[0], self.cr.fetchall())
- res = self.pool.get('account.analytic.line').browse(self.cr, self.uid, ids)
- return res
- def _sum_lines(self, journal_id):
- self.cr.execute('select sum(amount) from account_analytic_line where journal_id=%s', (journal_id,))
- return self.cr.fetchone()[0] or 0.0
- def __init__(self, cr, uid, name, context):
- super(journal_print, self).__init__(cr, uid, name, context=context)
- self.localcontext = {
- 'time': time,
- 'lines': self.lines,
- 'sum_lines': self._sum_lines,
- }
-report_sxw.report_sxw('report.account.analytic.journal.print', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=journal_print)
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/account/project/report/analytic_balance.py b/addons/account/project/report/analytic_balance.py
index 2aa9f2c549e..7c333b84c45 100644
--- a/addons/account/project/report/analytic_balance.py
+++ b/addons/account/project/report/analytic_balance.py
@@ -20,7 +20,7 @@
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.report import report_sxw
@@ -56,7 +56,6 @@ class account_analytic_balance(report_sxw.rml_parse):
self.get_children(data['child_ids'])
return True
-
def _get_objects(self, empty_acc):
if self.read_data:
return self.read_data
@@ -143,18 +142,16 @@ class account_analytic_balance(report_sxw.rml_parse):
WHERE account_id IN %s AND date>=%s AND date<=%s",query_params)
return self.cr.fetchone()[0] or 0.0
-
-
def _sum_balance(self, accounts, date1, date2):
debit = self._sum_all(accounts, date1, date2, 'debit') or 0.0
credit = self._sum_all(accounts, date1, date2, 'credit') or 0.0
return (debit-credit)
-report_sxw.report_sxw('report.account.analytic.account.balance',
- 'account.analytic.account', 'addons/account/project/report/analytic_balance.rml',
- parser=account_analytic_balance, header="internal")
-
+class report_analyticbalance(osv.AbstractModel):
+ _name = 'report.account.report_analyticbalance'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_analyticbalance'
+ _wrapped_report_class = account_analytic_balance
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
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.py b/addons/account/project/report/analytic_journal.py
index 1ca1ffb3ca4..c59efb057d7 100644
--- a/addons/account/project/report/analytic_journal.py
+++ b/addons/account/project/report/analytic_journal.py
@@ -20,9 +20,10 @@
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.report import report_sxw
+
#
# Use period and Journal for selection or resources
#
@@ -57,8 +58,11 @@ class account_analytic_journal(report_sxw.rml_parse):
res = self.cr.dictfetchone()
return res['sum'] or 0
-report_sxw.report_sxw('report.account.analytic.journal', 'account.analytic.journal', 'addons/account/project/report/analytic_journal.rml',parser=account_analytic_journal,header="internal")
+class report_analyticjournal(osv.AbstractModel):
+ _name = 'report.account.report_analyticjournal'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_analyticjournal'
+ _wrapped_report_class = account_analytic_journal
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
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.py b/addons/account/project/report/cost_ledger.py
index e594ab92a63..5eef375eaab 100644
--- a/addons/account/project/report/cost_ledger.py
+++ b/addons/account/project/report/cost_ledger.py
@@ -20,9 +20,10 @@
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.report import report_sxw
+
class account_analytic_cost_ledger(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context)
@@ -100,8 +101,11 @@ class account_analytic_cost_ledger(report_sxw.rml_parse):
credit = self._sum_credit(accounts, date1, date2)
return (debit-credit)
-report_sxw.report_sxw('report.account.analytic.account.cost_ledger', 'account.analytic.account', 'addons/account/project/report/cost_ledger.rml',parser=account_analytic_cost_ledger, header="internal")
+class report_analyticcostledger(osv.AbstractModel):
+ _name = 'report.account.report_analyticcostledger'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_analyticcostledger'
+ _wrapped_report_class = account_analytic_cost_ledger
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
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.py b/addons/account/project/report/inverted_analytic_balance.py
index bd86bcfe257..23129144555 100644
--- a/addons/account/project/report/inverted_analytic_balance.py
+++ b/addons/account/project/report/inverted_analytic_balance.py
@@ -20,7 +20,7 @@
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.report import report_sxw
class account_inverted_analytic_balance(report_sxw.rml_parse):
@@ -120,8 +120,11 @@ class account_inverted_analytic_balance(report_sxw.rml_parse):
WHERE account_id IN %s AND date>=%s AND date<=%s", (tuple(ids),date1, date2,))
return self.cr.fetchone()[0] or 0.0
-report_sxw.report_sxw('report.account.analytic.account.inverted.balance', 'account.analytic.account', 'addons/account/project/report/inverted_analytic_balance.rml',parser=account_inverted_analytic_balance, header="internal")
+class report_invertedanalyticbalance(osv.AbstractModel):
+ _name = 'report.account.report_invertedanalyticbalance'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_invertedanalyticbalance'
+ _wrapped_report_class = account_inverted_analytic_balance
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
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.py b/addons/account/project/report/quantity_cost_ledger.py
index b22558b900f..d3ed1cdc3a8 100644
--- a/addons/account/project/report/quantity_cost_ledger.py
+++ b/addons/account/project/report/quantity_cost_ledger.py
@@ -19,9 +19,10 @@
#
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.report import report_sxw
+
class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(account_analytic_quantity_cost_ledger, self).__init__(cr, uid, name, context=context)
@@ -116,9 +117,11 @@ class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
AND journal_id IN %s",(tuple(ids), date1, date2, tuple(journal_ids)))
return self.cr.fetchone()[0] or 0.0
-report_sxw.report_sxw('report.account.analytic.account.quantity_cost_ledger',
- 'account.analytic.account',
- 'addons/account/project/report/quantity_cost_ledger.rml',
- parser=account_analytic_quantity_cost_ledger, header="internal")
+
+class report_analyticcostledgerquantity(osv.AbstractModel):
+ _name = 'report.account.report_analyticcostledgerquantity'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_analyticcostledgerquantity'
+ _wrapped_report_class = account_analytic_quantity_cost_ledger
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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..09cd56fc83f
--- /dev/null
+++ b/addons/account/project/views/report_analyticbalance.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
Analytic Balance -
+
+
+
+
+ Code |
+ Account Name |
+ Debit |
+ Credit |
+ Balance |
+ Quantity |
+
+
+
+
+ Total |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/project/views/report_analyticcostledger.xml b/addons/account/project/views/report_analyticcostledger.xml
new file mode 100644
index 00000000000..cda37d4158f
--- /dev/null
+++ b/addons/account/project/views/report_analyticcostledger.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
Cost Ledger
+
+
+
+
+
+
+ Date/Code |
+ J.C. /Move |
+ Name |
+ Debit |
+ Credit |
+ Balance |
+
+
+
+
+ Total: |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
\ 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..de49d4972e5
--- /dev/null
+++ b/addons/account/project/views/report_analyticcostledgerquantity.xml
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
Cost Ledger
+
+
+
+
+
+
+ Date/Code |
+ J.C./Move |
+ Name |
+ Quantity |
+ Total |
+
+
+
+
+ Total: |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+ |
+ |
+ |
+
+
+ Max quantity :
+
+ |
+
+
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
\ 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..1b3a4fda97c
--- /dev/null
+++ b/addons/account/project/views/report_analyticjournal.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
Analytic Journal
+
+
+
+
+
+
+ Date |
+ Code |
+ Move Name |
+ Account n° |
+ General |
+ Analytic |
+
+
+ - |
+ |
+ |
+
+
+
+
+
+ |
+ |
+
+
+ |
+
+
+
+ |
+
+
+ |
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+ - |
+ |
+ |
+
+
+
+ |
+
|
+ |
+ - |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/project/views/report_invertedanalyticbalance.xml b/addons/account/project/views/report_invertedanalyticbalance.xml
new file mode 100644
index 00000000000..e545ec8525b
--- /dev/null
+++ b/addons/account/project/views/report_invertedanalyticbalance.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
Inverted Analytic Balance -
+
+
+
+
+ Code |
+ Account Name |
+ Debit |
+ Credit |
+ Balance |
+ Quantity |
+
+
+
+
+ Total |
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
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..125dfda46fb 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,12 @@ 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..ad79c0b33f6 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,11 @@ 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..f2e406bc3a5 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,15 @@ 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
+ }
+ context2 = context.copy()
+ context2['active_model'] = 'account.analytic.journal'
+ context2['active_ids'] = ids_list
+ return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticjournal', data=datas, context=context2)
+
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.py b/addons/account/report/account_aged_partner_balance.py
index 3b000e40592..3fd83c19207 100644
--- a/addons/account/report/account_aged_partner_balance.py
+++ b/addons/account/report/account_aged_partner_balance.py
@@ -20,9 +20,11 @@
##############################################################################
import time
+from openerp.osv import osv
from openerp.report import report_sxw
from common_report_header import common_report_header
+
class aged_trial_report(report_sxw.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context):
@@ -375,8 +377,11 @@ class aged_trial_report(report_sxw.rml_parse, common_report_header):
return self._translate('Receivable and Payable Accounts')
return ''
-report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
- 'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header="internal landscape")
+class report_agedpartnerbalance(osv.AbstractModel):
+ _name = 'report.account.report_agedpartnerbalance'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_agedpartnerbalance'
+ _wrapped_report_class = aged_trial_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_balance.py
index 2a445984b27..af2c37fc610 100644
--- a/addons/account/report/account_balance.py
+++ b/addons/account/report/account_balance.py
@@ -21,9 +21,11 @@
import time
+from openerp.osv import osv
from openerp.report import report_sxw
from common_report_header import common_report_header
+
class account_balance(report_sxw.rml_parse, common_report_header):
_name = 'report.account.account.balance'
@@ -58,11 +60,6 @@ class account_balance(report_sxw.rml_parse, common_report_header):
objects = self.pool.get('account.account').browse(self.cr, self.uid, new_ids)
return super(account_balance, self).set_context(objects, data, new_ids, report_type=report_type)
- #def _add_header(self, node, header=1):
- # if header == 0:
- # self.rml_header = ""
- # return True
-
def _get_account(self, data):
if data['model']=='account.account':
return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name
@@ -131,6 +128,11 @@ class account_balance(report_sxw.rml_parse, common_report_header):
_process_child(accounts,form['display_account'],parent)
return self.result_acc
-report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header="internal")
+
+class report_trialbalance(osv.AbstractModel):
+ _name = 'report.account.report_trialbalance'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_trialbalance'
+ _wrapped_report_class = account_balance
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_central_journal.py
index 8dae208a7a5..28892d0730e 100644
--- a/addons/account/report/account_central_journal.py
+++ b/addons/account/report/account_central_journal.py
@@ -20,11 +20,14 @@
##############################################################################
import time
+from openerp.osv import osv
from openerp.report import report_sxw
from common_report_header import common_report_header
#
# Use period and Journal for selection or resources
#
+
+
class journal_print(report_sxw.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context=None):
@@ -103,6 +106,11 @@ class journal_print(report_sxw.rml_parse, common_report_header):
return True
return data['form']['amount_currency']
-report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='external')
+
+class report_agedpartnerbalance(osv.AbstractModel):
+ _name = 'report.account.report_centraljournal'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_centraljournal'
+ _wrapped_report_class = journal_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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_entries_report.py b/addons/account/report/account_entries_report.py
index 6060d97c182..df2d92c9f12 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -94,7 +94,7 @@ class account_entries_report(osv.osv):
return super(account_entries_report, self).search(cr, uid, args=args, offset=offset, limit=limit, order=order,
context=context, count=count)
- def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
+ def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False,lazy=True):
if context is None:
context = {}
fiscalyear_obj = self.pool.get('account.fiscalyear')
@@ -108,7 +108,7 @@ class account_entries_report(osv.osv):
domain.append(['period_id','in',ids])
else:
domain = domain
- return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby)
+ return super(account_entries_report, self).read_group(cr, uid, domain, fields, groupby, offset, limit, context, orderby,lazy)
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_entries_report')
diff --git a/addons/account/report/account_financial_report.py b/addons/account/report/account_financial_report.py
index 2b1f5af4d68..064f02c5fbf 100644
--- a/addons/account/report/account_financial_report.py
+++ b/addons/account/report/account_financial_report.py
@@ -23,6 +23,8 @@ import time
from openerp.report import report_sxw
from common_report_header import common_report_header
from openerp.tools.translate import _
+from openerp.osv import osv
+
class report_account_common(report_sxw.rml_parse, common_report_header):
@@ -105,8 +107,11 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
lines.append(vals)
return lines
-report_sxw.report_sxw('report.account.financial.report', 'account.financial.report',
- 'addons/account/report/account_financial_report.rml', parser=report_account_common, header='internal')
+class report_financial(osv.AbstractModel):
+ _name = 'report.account.report_financial'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_financial'
+ _wrapped_report_class = report_account_common
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_general_journal.py
index 4f63411478c..ada615e31fa 100644
--- a/addons/account/report/account_general_journal.py
+++ b/addons/account/report/account_general_journal.py
@@ -20,8 +20,10 @@
##############################################################################
import time
-from common_report_header import common_report_header
+from openerp.osv import osv
from openerp.report import report_sxw
+from common_report_header import common_report_header
+
class journal_print(report_sxw.rml_parse, common_report_header):
@@ -156,6 +158,11 @@ class journal_print(report_sxw.rml_parse, common_report_header):
(tuple(move_state), period_id, tuple(journals)))
return self.cr.fetchone()[0] or 0.0
-report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal')
+
+class report_generaljournal(osv.AbstractModel):
+ _name = 'report.account.report_generaljournal'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_generaljournal'
+ _wrapped_report_class = journal_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_general_ledger.py
index 4f712ad58cc..ffccbec300d 100644
--- a/addons/account/report/account_general_ledger.py
+++ b/addons/account/report/account_general_ledger.py
@@ -28,9 +28,11 @@
##############################################################################
import time
+from openerp.osv import osv
from openerp.report import report_sxw
from common_report_header import common_report_header
+
class general_ledger(report_sxw.rml_parse, common_report_header):
_name = 'report.account.general.ledger'
@@ -304,7 +306,11 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
return self._translate('Journal & Partner')
return self._translate('Date')
-report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal')
-report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape')
+
+class report_generalledger(osv.AbstractModel):
+ _name = 'report.account.report_generalledger'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_generalledger'
+ _wrapped_report_class = general_ledger
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 24723d7fb12..eebc95ae0e2 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/addons/account/report/account_journal.py b/addons/account/report/account_journal.py
index 97e19be4b0c..13dfd538f4a 100644
--- a/addons/account/report/account_journal.py
+++ b/addons/account/report/account_journal.py
@@ -20,8 +20,10 @@
##############################################################################
import time
-from common_report_header import common_report_header
+from openerp.osv import osv
from openerp.report import report_sxw
+from common_report_header import common_report_header
+
class journal_print(report_sxw.rml_parse, common_report_header):
@@ -196,7 +198,18 @@ class journal_print(report_sxw.rml_parse, common_report_header):
return self._translate('Reference Number')
return self._translate('Date')
-report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='external')
-report_sxw.report_sxw('report.account.journal.period.print.sale.purchase', 'account.journal.period', 'addons/account/report/account_journal_sale_purchase.rml', parser=journal_print, header='external')
+
+class report_journal(osv.AbstractModel):
+ _name = 'report.account.report_journal'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_journal'
+ _wrapped_report_class = journal_print
+
+
+class report_salepurchasejournal(osv.AbstractModel):
+ _name = 'report.account.report_salepurchasejournal'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_salepurchasejournal'
+ _wrapped_report_class = journal_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_partner_balance.py
index 53edbbe9685..ecd287551e5 100644
--- a/addons/account/report/account_partner_balance.py
+++ b/addons/account/report/account_partner_balance.py
@@ -20,11 +20,12 @@
##############################################################################
import time
-
+from openerp.osv import osv
from openerp.tools.translate import _
from openerp.report import report_sxw
from common_report_header import common_report_header
+
class partner_balance(report_sxw.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context=None):
@@ -301,6 +302,11 @@ class partner_balance(report_sxw.rml_parse, common_report_header):
return _('Receivable and Payable Accounts')
return ''
-report_sxw.report_sxw('report.account.partner.balance', 'res.partner', 'account/report/account_partner_balance.rml',parser=partner_balance, header="internal")
+
+class report_partnerbalance(osv.AbstractModel):
+ _name = 'report.account.report_partnerbalance'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_partnerbalance'
+ _wrapped_report_class = partner_balance
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.py b/addons/account/report/account_partner_ledger.py
index d21323e02fc..f02ac96b6fc 100644
--- a/addons/account/report/account_partner_ledger.py
+++ b/addons/account/report/account_partner_ledger.py
@@ -20,10 +20,11 @@
##############################################################################
import time
-import re
+from openerp.osv import osv
+from openerp.tools.translate import _
from openerp.report import report_sxw
from common_report_header import common_report_header
-from openerp.tools.translate import _
+
class third_party_ledger(report_sxw.rml_parse, common_report_header):
@@ -297,12 +298,18 @@ class third_party_ledger(report_sxw.rml_parse, common_report_header):
return True
return False
-report_sxw.report_sxw('report.account.third_party_ledger', 'res.partner',
- 'addons/account/report/account_partner_ledger.rml',parser=third_party_ledger,
- header='internal')
-report_sxw.report_sxw('report.account.third_party_ledger_other', 'res.partner',
- 'addons/account/report/account_partner_ledger_other.rml',parser=third_party_ledger,
- header='internal')
+class report_partnerledger(osv.AbstractModel):
+ _name = 'report.account.report_partnerledger'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_partnerledger'
+ _wrapped_report_class = third_party_ledger
+
+
+class report_partnerledgerother(osv.AbstractModel):
+ _name = 'report.account.report_partnerledgerother'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_partnerledgerother'
+ _wrapped_report_class = third_party_ledger
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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.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.py b/addons/account/report/account_print_overdue.py
index e135f41309d..26192d39949 100644
--- a/addons/account/report/account_print_overdue.py
+++ b/addons/account/report/account_print_overdue.py
@@ -22,15 +22,36 @@
import time
from openerp.report import report_sxw
+from openerp.osv import osv
+
class Overdue(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(Overdue, self).__init__(cr, uid, name, context=context)
- self.localcontext.update( {
+ ids = context.get('active_ids')
+ partner_obj = self.pool['res.partner']
+ docs = partner_obj.browse(cr, uid, ids, context)
+
+ due = {}
+ paid = {}
+ mat = {}
+
+ for partner in docs:
+ due[partner.id] = 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)), self._lines_get(partner), 0)
+ paid[partner.id] = 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)), self._lines_get(partner), 0)
+ mat[partner.id] = reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), self._lines_get(partner)), 0)
+
+ addresses = self.pool['res.partner']._address_display(cr, uid, ids, None, None)
+ self.localcontext.update({
+ 'docs': docs,
'time': time,
'getLines': self._lines_get,
'tel_get': self._tel_get,
'message': self._message,
+ 'due': due,
+ 'paid': paid,
+ 'mat': mat,
+ 'addresses': addresses
})
self.context = context
@@ -41,7 +62,7 @@ class Overdue(report_sxw.rml_parse):
addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice'])
adr_id = addresses and addresses['invoice'] or False
if adr_id:
- adr=res_partner_address.read(self.cr, self.uid, [adr_id])[0]
+ adr=res_partner.read(self.cr, self.uid, [adr_id])[0]
return adr['phone']
else:
return partner.phone or False
@@ -62,5 +83,10 @@ class Overdue(report_sxw.rml_parse):
return message.split('\n')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+class report_overdue(osv.AbstractModel):
+ _name = 'report.account.report_overdue'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_overdue'
+ _wrapped_report_class = Overdue
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
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/report/report_vat.py b/addons/account/report/report_vat.py
index 236e2ffaac2..be2b6244f7d 100644
--- a/addons/account/report/report_vat.py
+++ b/addons/account/report/report_vat.py
@@ -19,25 +19,16 @@
#
##############################################################################
-from openerp.addons.web import http
-from openerp.addons.web.http import request
+import time
+from openerp.osv import osv
+from openerp.report import report_sxw
from common_report_header import common_report_header
-try:
- import cStringIO as StringIO
-except ImportError:
- import StringIO
-import xlwt
-class tax_report(http.Controller, common_report_header):
-
- @http.route(['/report/account.report_vat'], type='http', auth='user', website=True, multilang=True)
- def report_account_tax(self, **data):
- report_obj = request.registry['report']
- self.cr, self.uid, self.pool = request.cr, request.uid, request.registry
-
- data = report_obj.eval_params(data)
+class tax_report(report_sxw.rml_parse, common_report_header):
+ def set_context(self, objects, data, ids, report_type=None):
+ new_ids = ids
res = {}
self.period_ids = []
period_obj = self.pool.get('account.period')
@@ -47,16 +38,28 @@ class tax_report(http.Controller, common_report_header):
if data['form'].get('period_from', False) and data['form'].get('period_to', False):
self.period_ids = period_obj.build_ctx_periods(self.cr, self.uid, data['form']['period_from'], data['form']['period_to'])
+ periods_l = period_obj.read(self.cr, self.uid, self.period_ids, ['name'])
+ for period in periods_l:
+ if res['periods'] == '':
+ res['periods'] = period['name']
+ else:
+ res['periods'] += ", "+ period['name']
+ return super(tax_report, self).set_context(objects, data, new_ids, report_type=report_type)
- docargs = {
- 'fiscalyear': self._get_fiscalyear(data),
- 'account': self._get_account(data),
- 'based_on': self._get_basedon(data),
- 'period_from': self.get_start_period(data),
- 'period_to': self.get_end_period(data),
- 'taxlines': self._get_lines(self._get_basedon(data), company_id=data['form']['company_id']),
- }
- return request.registry['report'].render(self.cr, self.uid, [], 'account.report_vat', docargs)
+ def __init__(self, cr, uid, name, context=None):
+ super(tax_report, self).__init__(cr, uid, name, context=context)
+ self.localcontext.update({
+ 'time': time,
+ 'get_codes': self._get_codes,
+ 'get_general': self._get_general,
+ 'get_currency': self._get_currency,
+ 'get_lines': self._get_lines,
+ 'get_fiscalyear': self._get_fiscalyear,
+ 'get_account': self._get_account,
+ 'get_start_period': self.get_start_period,
+ 'get_end_period': self.get_end_period,
+ 'get_basedon': self._get_basedon,
+ })
def _get_basedon(self, form):
return form['form']['based_on']
@@ -191,6 +194,7 @@ class tax_report(http.Controller, common_report_header):
return self.pool.get('res.company').browse(self.cr, self.uid, form['company_id'], context=context).currency_id.name
def sort_result(self, accounts, context=None):
+ # On boucle sur notre rapport
result_accounts = []
ind=0
old_level=0
@@ -229,43 +233,11 @@ class tax_report(http.Controller, common_report_header):
return result_accounts
- @http.route(['/report/account.report_vat_xls'], type='http', auth='user', website=True, multilang=True)
- def report_account_tax_xls(self, **data):
- report_obj = request.registry['report']
- self.cr, self.uid, self.pool = request.cr, request.uid, request.registry
- data = report_obj.eval_params(data)
-
- res = {}
- self.period_ids = []
- period_obj = self.pool.get('account.period')
- self.display_detail = data['form']['display_detail']
- res['periods'] = ''
- res['fiscalyear'] = data['form'].get('fiscalyear_id', False)
-
- if data['form'].get('period_from', False) and data['form'].get('period_to', False):
- self.period_ids = period_obj.build_ctx_periods(self.cr, self.uid, data['form']['period_from'], data['form']['period_to'])
-
- content = ''
- lines = self._get_lines(self._get_basedon(data), company_id=data['form']['company_id'])
-
- if lines:
- xls = StringIO.StringIO()
- xls_workbook = xlwt.Workbook()
- vat_sheet = xls_workbook.add_sheet('report_vat')
-
- for x in range(0, len(lines)):
- for y in range(0, len(lines[0])):
- vat_sheet.write(x, y, lines[x].values()[y])
-
- xls_workbook.save(xls)
- xls.seek(0)
- content = xls.read()
-
- response = request.make_response(content, headers=[
- ('Content-Type', 'application/vnd.ms-excel'),
- ('Content-Disposition', 'attachment; filename=report_vat.xls;')
- ])
- return response
+class report_vat(osv.AbstractModel):
+ _name = 'report.account.report_vat'
+ _inherit = 'report.abstract_report'
+ _template = 'account.report_vat'
+ _wrapped_report_class = tax_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml
index 7a2d09486e4..9173c37b61e 100644
--- a/addons/account/test/account_report.yml
+++ b/addons/account/test/account_report.yml
@@ -16,10 +16,9 @@
import os
import openerp.report
from openerp import tools
- data, format = openerp.report.render_report(cr, uid, [ref('account.account_invoice_customer0')], 'account.invoice', {}, {})
+ data, format = openerp.report.render_report(cr, uid, [ref('account.account_invoice_customer0')], 'account.report_invoice', {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-invoice.'+format), 'wb+').write(data)
-
-
In order to test the PDF reports defined on a partner, we will print the Overdue Report
-
@@ -27,7 +26,7 @@
import os
import openerp.report
from openerp import tools
- data, format = openerp.report.render_report(cr, uid, [ref('base.res_partner_1'),ref('base.res_partner_2'),ref('base.res_partner_12')], 'account.overdue', {}, {})
+ data, format = openerp.report.render_report(cr, uid, [ref('base.res_partner_1'),ref('base.res_partner_2'),ref('base.res_partner_12')], 'account.report_overdue', {}, {})
if tools.config['test_report_directory']:
file(os.path.join(tools.config['test_report_directory'], 'account-report_overdue.'+format), 'wb+').write(data)
-
@@ -86,8 +85,8 @@
Print the General Ledger Report in Landscape Mode
-
!python {model: account.account}: |
- ctx={}
- data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
+ ctx={'landscape': True}
+ data_dict = {'chart_account_id':ref('account.chart0')}
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
-
diff --git a/addons/account/views/report_agedpartnerbalance.xml b/addons/account/views/report_agedpartnerbalance.xml
new file mode 100644
index 00000000000..019f32a35de
--- /dev/null
+++ b/addons/account/views/report_agedpartnerbalance.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
Aged Trial Balance
+
+
+
+
+
+
+
Period Length (days)
+
+
+
+
+
+
Partner's:
+
+ Receivable Accounts
+ Payable Accounts
+ Receivable and Payable Accounts
+
+
+
+
Analysis Direction:
+
+
+
+
+
+
+
+
+ Partners |
+
+ Due
+ Not due
+ |
+ |
+ |
+ |
+ |
+ |
+ Total |
+
+
+ Account Total |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
Centralized Journal
+
+
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+
+ A/C No. |
+ Account Name |
+ Debit |
+ Credit |
+ Balance |
+ Currency |
+
+
+ Total: |
+
+
+ |
+
+
+ |
+
+
+ |
+ |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Name |
+ Debit |
+ Credit |
+ Balance |
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+ Name |
+ Balance |
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
+
+
+ Name |
+ Balance |
+ |
+
+
+
+
+
+
+
+
+
+
+
+ |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_generaljournal.xml b/addons/account/views/report_generaljournal.xml
new file mode 100644
index 00000000000..062c9ec2554
--- /dev/null
+++ b/addons/account/views/report_generaljournal.xml
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
General Journal
+
+
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Code |
+ Journal Name |
+ Debit |
+ Credit |
+ Balance |
+ Currency |
+
+
+ Total: |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ : |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
: General ledger
+
+
+
+
+
+
+
Display Account
+
+ All accounts'
+ With movements
+ With balance not equal to zero
+
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+
+ Date |
+ JRNL |
+ Partner |
+ Ref |
+ Move |
+ Entry Label |
+ Counterpart |
+ Debit |
+ Credit |
+ Progress |
+ Currency |
+
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_invoice.xml b/addons/account/views/report_invoice.xml
new file mode 100644
index 00000000000..6757095a7d4
--- /dev/null
+++ b/addons/account/views/report_invoice.xml
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+ Invoice
+ PRO-FORMA
+ Draft Invoice
+ Cancelled Invoice
+ Refund
+ Supplier Refund
+ Supplier Invoice
+
+
+
+
+
+
+
+
+ Description |
+ Quantity |
+ Unit of measure |
+ Unit Price |
+ Discount (%) |
+ Taxes |
+ Amount |
+
+
+
+
+ |
+ |
+ |
+
+
+ |
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+ Total Without Taxes |
+
+
+ |
+
+
+ Taxes |
+
+
+ |
+
+
+ Total |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+ Tax |
+ Base |
+ Amount |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+ Comment:
+
+
+
+ Payment Term:
+
+
+
+ Fiscal Position:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_journal.xml b/addons/account/views/report_journal.xml
new file mode 100644
index 00000000000..0771b5f5fe9
--- /dev/null
+++ b/addons/account/views/report_journal.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
Journal
+
+
+
+
+
Entries Sorted By:
+
Date
+
Journal Entry Number
+
+
+
+
+
+
+
+ Move |
+ Date |
+ Account |
+ Partner |
+ Label |
+ Debit |
+ Credit |
+ Currency |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_overdue.xml b/addons/account/views/report_overdue.xml
new file mode 100644
index 00000000000..bc522aa8b9d
--- /dev/null
+++ b/addons/account/views/report_overdue.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+ Document: Customer account statement
+ Date:
+ Customer ref:
+
+
+
+
+
+
+
+
+
+
+
+ Date |
+ Description |
+ Ref |
+ Maturity Date |
+ Due |
+ Paid |
+ Maturity |
+ Li. |
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+ x
+ |
+
+
+ |
+ Sub-Total : |
+ |
+ |
+ |
+ |
+
+
+ |
+ Balance : |
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+ Total amount due:
+
+
+
+
+ There is nothing due with this customer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
Partner Balance
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Code |
+ (Account/Partner) Name |
+ Debit |
+ Credit |
+ Balance |
+ In dispute |
+
+
+
+
+ Total: |
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
Partner Ledger
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Date |
+ JRNL |
+ Ref |
+ Account |
+ Entry Label |
+ Debit |
+ Credit |
+ Balance |
+ Currency |
+
+
+
+
+
+
+
+ -
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ Initial Balance |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ -
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
Partner Ledger
+
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Date |
+ JRNL |
+ Ref |
+ Account |
+ Entry Label |
+ Debit |
+ Credit |
+ Balance |
+ Currency |
+
+
+
+
+
+
+ -
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ Initial Balance |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ -
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_salepurchasejournal.xml b/addons/account/views/report_salepurchasejournal.xml
new file mode 100644
index 00000000000..f1d8724f285
--- /dev/null
+++ b/addons/account/views/report_salepurchasejournal.xml
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
Sale/Purchase Journal
+
+
+
+
+
Entries Sorted By:
+
Journal Entry Number
+
Date
+
+
+
+
+
+
+
+ Move |
+ Date |
+ Account |
+ Partner |
+ Label |
+ Tax |
+ Debit |
+ Credit |
+ Currency |
+
+
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+ Tax Declaration |
+
+
+
+ : |
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
: Trial Balance
+
+
+
+
+
+
Display Account:
+
+ All accounts
+ With movements
+ With balance not equal to zero
+
+
+
+
Filter By:
+
+ Not filtered
+ Filtered by period
+ Filtered by date
+
+ Start Period:
+ End Period:
+
+
+ Date from :
+ Date to :
+
+
+
+
+
+
+
+
+
+ Code |
+ Account |
+ Debit |
+ Credit |
+ Balance |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/addons/account/views/report_vat.xml b/addons/account/views/report_vat.xml
index 03664045ef4..f88d45e5c44 100644
--- a/addons/account/views/report_vat.xml
+++ b/addons/account/views/report_vat.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/addons/account/wizard/account_financial_report.py b/addons/account/wizard/account_financial_report.py
index 48bdfd33081..6c1b57fa428 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,11 @@ 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']['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_aged_partner_balance_view.xml b/addons/account/wizard/account_report_aged_partner_balance_view.xml
index be1d710c09d..09ae525c595 100644
--- a/addons/account/wizard/account_report_aged_partner_balance_view.xml
+++ b/addons/account/wizard/account_report_aged_partner_balance_view.xml
@@ -19,6 +19,7 @@
+