[REF] product_expiry: removed openerp.pooler imports.
bzr revid: vmt@openerp.com-20130327135327-6ik2cu30kbfcnu6a
This commit is contained in:
parent
d9b3bc9670
commit
d544a585e1
|
@ -19,8 +19,9 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
import openerp
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
from openerp import pooler
|
|
||||||
|
|
||||||
class stock_production_lot(osv.osv):
|
class stock_production_lot(osv.osv):
|
||||||
_inherit = 'stock.production.lot'
|
_inherit = 'stock.production.lot'
|
||||||
|
@ -34,7 +35,7 @@ class stock_production_lot(osv.osv):
|
||||||
if not context.get('product_id', False):
|
if not context.get('product_id', False):
|
||||||
date = False
|
date = False
|
||||||
else:
|
else:
|
||||||
product = pooler.get_pool(cr.dbname).get('product.product').browse(
|
product = openerp.registry(cr.dbname)['product.product'].browse(
|
||||||
cr, uid, context['product_id'])
|
cr, uid, context['product_id'])
|
||||||
duration = getattr(product, dtype)
|
duration = getattr(product, dtype)
|
||||||
# set date to False when no expiry time specified on the product
|
# set date to False when no expiry time specified on the product
|
||||||
|
|
Loading…
Reference in New Issue