From 392b094d9b476dc1fc1a4819903857dc65a6bfbe Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 13 Jul 2012 14:57:28 +0200 Subject: [PATCH] [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 --- openerp/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index d287db4be0b..4a7fcbc2601 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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)