diff --git a/addons/account/account.py b/addons/account/account.py index 28fff33a4bc..df6a0492ff9 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -157,8 +157,6 @@ class account_account_type(osv.osv): ('asset','Balance Sheet (Assets Accounts)'), ('liability','Balance Sheet (Liability Accounts)') ],'Type Heads', select=True, readonly=False, help="According value related accounts will be display on respective reports (Balance Sheet Profit & Loss Account)"), - 'parent_id':fields.many2one('account.account.type', 'Parent Type', required=False), - 'child_ids':fields.one2many('account.account.type', 'parent_id', 'Child Types', required=False), 'note': fields.text('Description'), } _defaults = { @@ -167,14 +165,6 @@ class account_account_type(osv.osv): } _order = "code" - def _check_recursion(self, cr, uid, ids): - #TODO: Need to check for recusrion - return True - - _constraints = [ - (_check_recursion, 'Error ! You can not create recursive types.', ['parent_id']) - ] - account_account_type() def _code_get(self, cr, uid, context={}): @@ -690,23 +680,23 @@ class account_journal(osv.osv): """ Returns a list of tupples containing id, name. result format : {[(id, name), (id, name), ...]} - + @param cr: A database cursor @param user: ID of the user currently logged in @param ids: list of ids for which name should be read @param context: context arguments, like lang, time zone - + @return: Returns a list of tupples containing id, name """ result = self.browse(cr, user, ids, context) res = [] for rs in result: - name = rs.name + name = rs.name if rs.currency: name = "%s (%s)" % (rs.name, rs.currency.name) res += [(rs.id, name)] return res - + def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100): if not args: args = [] @@ -2747,7 +2737,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): vals_journal['sequence_id'] = seq_id vals_journal['type'] = 'cash' vals_journal['company_id'] = company_id - + if line.currency_id: vals_journal['view_id'] = view_id_cur vals_journal['currency'] = line.currency_id.id diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index dc830bc7fef..b56b3100a5b 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -668,6 +668,7 @@ + account.account.type.form account.account.type @@ -677,7 +678,6 @@ -