From a74b2f29b8c68e236bb68f9e342a54579cd247d6 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sat, 14 Jun 2008 15:14:19 +0000 Subject: [PATCH] Improvements bzr revid: fp@tinyerp.com-291bb12c14e87ccfcc1ce370f353fe5a87f1ced4 --- addons/account/account.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 62ea03e9f50..b315e944a0a 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -121,6 +121,11 @@ def _code_get(self, cr, uid, context={}): #---------------------------------------------------------- # Accounts #---------------------------------------------------------- + +class account_tax(osv.osv): + _name = 'account.tax' +account_tax() + class account_account(osv.osv): _order = "code" _name = "account.account" @@ -289,12 +294,6 @@ class account_account(osv.osv): _constraints = [ (_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id']) ] - def init(self, cr): - cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname='account_tax'") - if len(cr.dictfetchall())==0: - cr.execute("CREATE TABLE account_tax (id SERIAL NOT NULL, perm_id INTEGER, PRIMARY KEY(id))"); - cr.commit() - def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=80): if not args: args=[]