[FIX] column._domain is now copied instead of being extended in-place.
This commit removes a bug which causes the _domain attribute on the column class to grow as the fields_get() is repeatedly called. For instance, displaying the Customer Invoice views (on account.invoice) repeatedly by switching between the list and form views and causing a full page refresh (e.g. with ctrl-shift-r) makes the period_id field _column attribute to grow. Variable aliasing and mutability are so kewl :) bzr revid: vmt@openerp.com-20120713125728-yhegsthi7jaxi5gc
This commit is contained in:
+1
-1
@@ -1677,7 +1677,7 @@ class BaseModel(object):
|
||||
dom = []
|
||||
if column._domain and not isinstance(column._domain, basestring):
|
||||
dom = column._domain
|
||||
dom += eval(node.get('domain', '[]'), {'uid': user, 'time': time})
|
||||
dom = dom + eval(node.get('domain', '[]'), {'uid': user, 'time': time})
|
||||
search_context = dict(context)
|
||||
if column._context and not isinstance(column._context, basestring):
|
||||
search_context.update(column._context)
|
||||
|
||||
Reference in New Issue
Block a user