par = self._get_parent()
uid = par.context.uid
- cr = openerp.registry(par.context.dbname).get_cursor()
+ cr = openerp.registry(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
data = self.getvalue()
par = self._get_parent()
# uid = par.context.uid
- cr = openerp.registry(par.context.dbname).get_cursor()
+ cr = openerp.registry(par.context.dbname).cursor()
try:
if self.mode in ('w', 'w+', 'r+'):
data = self.getvalue()
registry = openerp.modules.registry.RegistryManager.get(db_name)
assert registry, 'Unknown database %s' % db_name
edi = registry['edi.edi']
- cr = registry.get_cursor()
+ cr = registry.cursor()
res = None
res = getattr(edi, method_name)(cr, *method_args)
cr.commit()
context = {}
try:
if use_new_cursor:
- cr = openerp.registry(use_new_cursor).get_cursor()
+ cr = openerp.registry(use_new_cursor).cursor()
procurement_obj = self.pool.get('procurement.order')
if not skip_exception:
if context is None:
context = {}
if use_new_cursor:
- cr = openerp.registry(use_new_cursor).get_cursor()
+ cr = openerp.registry(use_new_cursor).cursor()
orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
procurement_obj = self.pool.get('procurement.order')
"""
proc_obj = self.pool.get('procurement.order')
#As this function is in a new thread, I need to open a new cursor, because the old one may be closed
- new_cr = self.pool.get_cursor()
+ new_cr = self.pool.cursor()
for proc in self.browse(new_cr, uid, ids, context=context):
proc_obj._procure_orderpoint_confirm(new_cr, uid, automatic=proc.automatic, use_new_cursor=new_cr.dbname, context=context)
#close the new cursor
"""
proc_obj = self.pool.get('procurement.order')
#As this function is in a new thread, i need to open a new cursor, because the old one may be closed
- new_cr = self.pool.get_cursor()
+ new_cr = self.pool.cursor()
for proc in self.browse(new_cr, uid, ids, context=context):
proc_obj.run_scheduler(new_cr, uid, automatic=proc.automatic, use_new_cursor=new_cr.dbname,\
context=context)