[FIX] fields: duplicate float fields per registry (because they are stateful).

lp bug: https://launchpad.net/bugs/929483 fixed

bzr revid: vmt@openerp.com-20120215101714-zjsdcizzb1m2x6k5
This commit is contained in:
Vo Minh Thu 2012-02-15 11:17:14 +01:00
parent 5d4ff77bd3
commit 64ba0da663
1 changed files with 5 additions and 0 deletions

View File

@ -886,6 +886,11 @@ class BaseModel(object):
for c in new.keys():
if new[c].manual:
del new[c]
# Duplicate float fields because they have a .digits
# cache (which must be per-registry, not server-wide).
for c in new.keys():
if new[c]._type == 'float':
new[c] = copy.copy(new[c])
if hasattr(new, 'update'):
new.update(cls.__dict__.get(s, {}))
elif s=='_constraints':