[REF] account: Renamed the object account.low.level.report to account.financial.report.

bzr revid: uco@tinyerp.com-20110909055456-f4s8yh6nzyrxoo3z
This commit is contained in:
Ujjvala Collins (OpenERP) 2011-09-09 11:24:56 +05:30
parent 9a5a5f5dbb
commit d75e8e130b
9 changed files with 36 additions and 36 deletions

View File

@ -98,7 +98,7 @@ module named account_voucher.
'wizard/account_reconcile_view.xml',
'wizard/account_reconcile_partner_process_view.xml',
'wizard/account_automatic_reconcile_view.xml',
'wizard/account_low_level_report_view.xml',
'wizard/account_financial_report_view.xml',
'project/wizard/project_account_analytic_line_view.xml',
'account_end_fy.xml',
'account_invoice_view.xml',

View File

@ -2616,8 +2616,8 @@ class account_fiscal_position_account_template(osv.osv):
account_fiscal_position_account_template()
class account_low_level_report(osv.osv):
_name = "account.low.level.report"
class account_financial_report(osv.osv):
_name = "account.financial.report"
_description = "Account Report"
def _get_level(self, cr, uid, ids, field_name, arg, context=None):
@ -2664,17 +2664,17 @@ class account_low_level_report(osv.osv):
_columns = {
'name': fields.char('Report Name', size=128, required=True),
'parent_id': fields.many2one('account.low.level.report', 'Parent'),
'children_ids': fields.one2many('account.low.level.report', 'parent_id', 'Account Report'),
'parent_id': fields.many2one('account.financial.report', 'Parent'),
'children_ids': fields.one2many('account.financial.report', 'parent_id', 'Account Report'),
'sequence': fields.integer('Sequence'),
'type': fields.selection([
('sum','Sum'),
('accounts','Accounts'),
('account_report','Account Report'),
],'Type'),
'account_ids': fields.many2many('account.account', 'account_account_low_level_report', 'report_line_id', 'account_id', 'Accounts'),
'account_ids': fields.many2many('account.account', 'account_account_financial_report', 'report_line_id', 'account_id', 'Accounts'),
'note': fields.text('Notes'),
'account_report_id': fields.many2one('account.low.level.report', 'Account Report'),
'account_report_id': fields.many2one('account.financial.report', 'Account Report'),
'balance': fields.function(_get_balance, 'Balance'),
'display_detail': fields.boolean('Display the account list'),
'level': fields.function(_get_level, string='Level', store=True, type='integer'),
@ -2684,7 +2684,7 @@ class account_low_level_report(osv.osv):
'type': 'sum',
}
account_low_level_report()
account_financial_report()
# Multi charts of Accounts wizard

View File

@ -2707,9 +2707,9 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
Account Reports
-->
<record id="view_account_low_level_report_form" model="ir.ui.view">
<field name="name">account.low.level.report.form</field>
<field name="model">account.low.level.report</field>
<record id="view_account_financial_report_form" model="ir.ui.view">
<field name="name">account.financial.report.form</field>
<field name="model">account.financial.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Report">
@ -2727,9 +2727,9 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
</field>
</record>
<record id="view_account_low_level_report_tree" model="ir.ui.view">
<field name="name">account.low.level.report.tree</field>
<field name="model">account.low.level.report</field>
<record id="view_account_financial_report_tree" model="ir.ui.view">
<field name="name">account.financial.report.tree</field>
<field name="model">account.financial.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Report">
@ -2741,9 +2741,9 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
</field>
</record>
<record id="view_account_low_level_report_search" model="ir.ui.view">
<field name="name">account.low.level.report.search</field>
<field name="model">account.low.level.report</field>
<record id="view_account_financial_report_search" model="ir.ui.view">
<field name="name">account.financial.report.search</field>
<field name="model">account.financial.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Account Report">
@ -2762,21 +2762,21 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
</field>
</record>
<record id="action_account_low_level_report_tree" model="ir.actions.act_window">
<record id="action_account_financial_report_tree" model="ir.actions.act_window">
<field name="name">Account Reports</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.low.level.report</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_low_level_report_search"/>
<field name="view_id" ref="view_account_low_level_report_tree"/>
<field name="search_view_id" ref="view_account_financial_report_search"/>
<field name="view_id" ref="view_account_financial_report_tree"/>
</record>
<menuitem id="menu_account_low_level_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_low_level_report_tree"/>
<menuitem id="menu_account_financial_reports_tree" name="Account Reports" parent="menu_account_reports" action="action_account_financial_report_tree"/>
<record id="view_account_report_tree_hierarchy" model="ir.ui.view">
<field name="name">account.report.hierarchy</field>
<field name="model">account.low.level.report</field>
<field name="model">account.financial.report</field>
<field name="type">tree</field>
<field name="field_parent">children_ids</field>
<field name="arch" type="xml">
@ -2790,7 +2790,7 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
</record>
<record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
<field name="name">Account Reports Hierarchy</field>
<field name="res_model">account.low.level.report</field>
<field name="res_model">account.financial.report</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_account_report_tree_hierarchy"/>
<field name="domain">[('parent_id','=',False)]</field>

View File

@ -42,7 +42,7 @@ import account_analytic_entries_report
import account_balance_sheet
import account_profit_loss
import account_treasury_report
import account_low_level_report
import account_financial_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -52,8 +52,8 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
lines = []
account_obj = self.pool.get('account.account')
currency_obj = self.pool.get('res.currency')
ids2 = self.pool.get('account.low.level.report')._get_children_by_order(self.cr, self.uid, [data['form']['account_report_id'][0]], context=data['form']['used_context'])
for report in self.pool.get('account.low.level.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']):
ids2 = self.pool.get('account.financial.report')._get_children_by_order(self.cr, self.uid, [data['form']['account_report_id'][0]], context=data['form']['used_context'])
for report in self.pool.get('account.financial.report').browse(self.cr, self.uid, ids2, context=data['form']['used_context']):
vals = {
'name': report.name,
'balance': report.balance,
@ -61,7 +61,7 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
'level': report.level,
}
if data['form']['enable_filter']:
vals['balance_cmp'] = self.pool.get('account.low.level.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance
vals['balance_cmp'] = self.pool.get('account.financial.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance
lines.append(vals)
if report.type == 'accounts' and report.display_detail and report.account_ids:
account_ids = account_obj._get_children_and_consol(self.cr, self.uid, [x.id for x in report.account_ids])
@ -85,6 +85,6 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
lines.append(vals)
return lines
report_sxw.report_sxw('report.account.low.level.report', 'account.low.level.report',
'addons/account/report/account_low_level_report.rml', parser=report_account_common, header='internal')
report_sxw.report_sxw('report.account.financial.report', 'account.financial.report',
'addons/account/report/account_financial_report.rml', parser=report_account_common, header='internal')

View File

@ -47,7 +47,7 @@ import account_open_closed_fiscalyear
import account_invoice_state
import account_chart
import account_tax_chart
import account_low_level_report
import account_financial_report
#TODO: remove this file no moe used
# also remove related view fiel

View File

@ -28,7 +28,7 @@ class accounting_report(osv.osv_memory):
_columns = {
'enable_filter': fields.boolean('Enable Comparison'),
'account_report_id': fields.many2one('account.low.level.report', 'Account Reports', required=True),
'account_report_id': fields.many2one('account.financial.report', 'Account Reports', required=True),
'label_filter': fields.char('Column Label', size=32, help="This label will be displayed on report to show the balance computed for the given comparison filter."),
'fiscalyear_id_cmp': fields.many2one('account.fiscalyear', 'Fiscal Year', help='Keep empty for all open fiscal year'),
'filter_cmp': fields.selection([('filter_no', 'No Filters'), ('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by", required=True),
@ -42,7 +42,7 @@ class accounting_report(osv.osv_memory):
'filter_cmp': 'filter_no',
'target_move': 'posted',
}
def _build_contexts_low(self, cr, uid, ids, data, context=None):
if context is None:
context = {}
@ -59,10 +59,10 @@ class accounting_report(osv.osv_memory):
result['period_from'] = data['form']['period_from_cmp']
result['period_to'] = data['form']['period_to_cmp']
return result
def check_report(self, cr, uid, ids, context=None):
if context is None:
context = {}
context = {}
res = super(accounting_report, self).check_report(cr, uid, ids, context=context)
data = {}
data['form'] = self.read(cr, uid, ids, ['account_report_id', 'date_from_cmp', 'date_to_cmp', 'fiscalyear_id_cmp', 'journal_ids', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'chart_account_id', 'target_move'], context=context)[0]
@ -80,7 +80,7 @@ class accounting_report(osv.osv_memory):
data['form'].update(self.read(cr, uid, ids, ['date_from_cmp', 'date_to_cmp', 'fiscalyear_id_cmp', 'period_from_cmp', 'period_to_cmp', 'filter_cmp', 'account_report_id', 'enable_filter', 'label_filter'], context=context)[0])
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.low.level.report',
'report_name': 'account.financial.report',
'datas': data,
}