diff --git a/bin/osv/orm.py b/bin/osv/orm.py index b93a715ceb0..ec61d9aa5fb 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2130,7 +2130,10 @@ class orm(orm_template): 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 # diff --git a/bin/tools/convert.py b/bin/tools/convert.py index dedc7abb858..71bbb800cf5 100644 --- a/bin/tools/convert.py +++ b/bin/tools/convert.py @@ -677,7 +677,12 @@ form: module.record_id""" % (xml_id,) 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 diff --git a/bin/tools/translate.py b/bin/tools/translate.py index 0f84bdc9b45..5b309cffc55 100644 --- a/bin/tools/translate.py +++ b/bin/tools/translate.py @@ -566,7 +566,10 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name= 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