From a5e5b5b8fc35572b4be95ab78a9ebe2a506f9858 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 2 Dec 2008 19:38:21 +0100 Subject: [PATCH] [IMP] views don't need to include the state field anymore to be state aware bzr revid: christophe@tinyerp.com-20081202183821-iodzmaanf3ib0asb --- bin/osv/orm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index c0c44e608b7..0803a7ace38 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -847,6 +847,10 @@ class orm_template(object): if childs: for f in node.childNodes: fields.update(self.__view_look_dom(cr, user, f, context)) + + if ('state' not in fields) and (('state' in self._columns) or ('state' in self._inherit_fields)): + fields['state'] = {} + return fields def __view_look_dom_arch(self, cr, user, node, context=None):