From bfaf65f84cfda57e45fd99b0c0c22295b1a29852 Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Tue, 12 Feb 2013 15:32:53 +0100 Subject: [PATCH] [FIX] imports --- currency_rate_update/company.py | 6 ++++-- currency_rate_update/currency_rate_update.py | 8 +++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/currency_rate_update/company.py b/currency_rate_update/company.py index 06b9db76f..dd836f4cf 100644 --- a/currency_rate_update/company.py +++ b/currency_rate_update/company.py @@ -29,7 +29,8 @@ ############################################################################## import netsvc -from osv import fields, osv +from openerp.osv import fields, osv + class res_company(osv.osv): """override company to add currency update""" @@ -161,4 +162,5 @@ class res_company(osv.osv): ' not set currency is active on two company' ), } -res_company() + + diff --git a/currency_rate_update/currency_rate_update.py b/currency_rate_update/currency_rate_update.py index 4c7ccfd98..4c95d109b 100755 --- a/currency_rate_update/currency_rate_update.py +++ b/currency_rate_update/currency_rate_update.py @@ -42,11 +42,11 @@ # a webservice to the list of currencies supported by the Webservice # TODO : implement max_delta_days for Yahoo webservice -from osv import osv, fields +from openerp.osv import fields, osv import time from datetime import datetime, timedelta import logging -from tools.translate import _ +from openerp.tools.translate import _ _logger = logging.getLogger(__name__) @@ -109,7 +109,6 @@ class Currency_rate_update_service(osv.osv): (_check_max_delta_days, "'Max delta days' must be >= 0", ['max_delta_days']), ] -Currency_rate_update_service() class Currency_rate_update(osv.osv): """Class that handle an ir cron call who will @@ -228,8 +227,7 @@ class Currency_rate_update(osv.osv): _logger.info(str(e)) service.write({'note':error_msg}) - -Currency_rate_update() + ### Error Definition as specified in python 2.6 PEP class AbstractClassError(Exception):