if f._type in self._fields_process:
for d in datas:
d[n] = self._fields_process[f._type](d[n])
- d[n].set_value(d[n], self, f)
+ if d[n]:
+ d[n].set_value(self._cr, self._uid, d[n], self, f)
+ if not datas:
+ # Where did those ids come from? Perhaps old entries in ir_model_data?
+ raise except_orm('NoDataError', 'Field %s in %s%s'%(name,self._table_name,str(ids)))
# create browse records for 'remote' objects
for data in datas:
for n, f in ffields:
'decimal_point' : str(locale.nl_langinfo(locale.RADIXCHAR)),
'thousands_sep' : str(locale.nl_langinfo(locale.THOUSEP))
})
+ # Here we try to reset the locale regardless.
- locale.setlocale(locale.LC_ALL, str(lc + '.' + encoding))
+ try:
- locale.resetlocale(locale.LC_ALL)
++ locale.setlocale(locale.LC_ALL, str(lc + '.' + encoding))
+ except:
+ pass
lang_ids = lang_obj.search(cr, uid, [])
langs = lang_obj.read(cr, uid, lang_ids)
ls = map(lambda x: (x['code'],x['name']), langs)