for order, object, ids, fields in result_store:
if object<>self._name:
- self.pool.get(object)._store_set_values(cr, uid, ids, fields, context)
+ cr.execute('select id from '+self._table+' where id in ('+','.join(map(str, ids))+')')
+ ids = map(lambda x: x[0], cr.fetchall())
+ if ids:
+ self.pool.get(object)._store_set_values(cr, uid, ids, fields, context)
return True
#
if self.isnoupdate(data_node) and self.mode != 'init':
# check if the xml record has an id string
if rec_id:
- id = self.pool.get('ir.model.data')._update_dummy(cr, self.uid, rec_model, self.module, rec_id)
+ if '.' in rec_id:
+ module,rec_id2 = rec_id.split('.')
+ else:
+ module = self.module
+ rec_id2 = rec_id
+ id = self.pool.get('ir.model.data')._update_dummy(cr, self.uid, rec_model, module, rec_id2)
# check if the resource already existed at the last update
if id:
# if it existed, we don't update the data, but we need to
finally:
# locale.resetlocale is bugged with some locales.
# we need to normalize the result of locale.getdefaultlocale()
- locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale())))
+ try:
+ locale.setlocale(locale.LC_ALL, locale.normalize(locale._build_localename(locale.getdefaultlocale())))
+ except:
+ locale.setlocale(locale.LC_ALL, lc)
# now, the serious things: we read the language file