From d544a585e10cfdd40d0802608270cec0c4bf529e Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Wed, 27 Mar 2013 14:53:27 +0100 Subject: [PATCH] [REF] product_expiry: removed openerp.pooler imports. bzr revid: vmt@openerp.com-20130327135327-6ik2cu30kbfcnu6a --- addons/product_expiry/product_expiry.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/product_expiry/product_expiry.py b/addons/product_expiry/product_expiry.py index e939e594437..457b4428522 100644 --- a/addons/product_expiry/product_expiry.py +++ b/addons/product_expiry/product_expiry.py @@ -19,8 +19,9 @@ ############################################################################## import datetime + +import openerp from openerp.osv import fields, osv -from openerp import pooler class stock_production_lot(osv.osv): _inherit = 'stock.production.lot' @@ -34,7 +35,7 @@ class stock_production_lot(osv.osv): if not context.get('product_id', False): date = False else: - product = pooler.get_pool(cr.dbname).get('product.product').browse( + product = openerp.registry(cr.dbname)['product.product'].browse( cr, uid, context['product_id']) duration = getattr(product, dtype) # set date to False when no expiry time specified on the product