From 0cf8decf21693de75d6a8a48c5d13f6dc0fa5883 Mon Sep 17 00:00:00 2001 From: vth Date: Wed, 3 Nov 2010 11:15:01 +0530 Subject: [PATCH] [FIX] Account : improve _order on account.tax.code and account.journal object lp bug: https://launchpad.net/bugs/669877 fixed bzr revid: vth@tinyerp.com-20101103054501-ceim3std9q4vtk1i --- addons/account/account.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 6bd34048e3b..507d1d392d9 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -615,6 +615,8 @@ class account_journal(osv.osv): 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, } + _order = 'code' + def write(self, cr, uid, ids, vals, context=None): if 'company_id' in vals: move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)]) @@ -1584,7 +1586,6 @@ class account_tax_code(osv.osv): 'notprintable':fields.boolean("Not Printable in Invoice", help="Check this box if you don't want any VAT related to this Tax Code to appear on invoices"), } - def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): if not args: args = [] @@ -1627,7 +1628,7 @@ class account_tax_code(osv.osv): _constraints = [ (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']) ] - _order = 'code,name' + _order = 'code' account_tax_code() class account_tax(osv.osv):