记录:
6.1.1下会提示uid没有定义,官方buglist中此bug已经解决,但是截至今天(2012.6.28)下载的最新latest版本还是有次问题,只能手动修改,修改方法:
<br />=== modified file 'openerp/osv/orm.py'<br />--- openerp/osv/orm.py 2012-03-09 08:19:29 +0000<br />+++ openerp/osv/orm.py 2012-03-17 14:14:43 +0000<br />@@ -53,6 +53,7 @@<br /> import time<br /> import types<br /> from lxml import etree<br /> <br /> import fields<br /> import openerp<br />@@ -96,7 +97,7 @@<br /> # For non-tree views, the context shouldn't be given.<br /> def transfer_node_to_modifiers(node, modifiers, context=None, in_tree_view=False):<br /> if node.get('attrs'):<br />- modifiers.update(eval(node.get('attrs')))<br />+ modifiers.update(eval(node.get('attrs'), context))<br /> <br /> if node.get('states'):<br /> if 'invisible' in modifiers and isinstance(modifiers['invisible'], list):<br />@@ -1706,6 +1707,13 @@<br /> <br /> # The view architeture overrides the python model.<br /> # Get the attrs before they are (possibly) deleted by check_group below<br />+ context.update(<br />+ uid = user,<br />+ current_date = time.strftime('%Y-%m-%d'),<br />+ )<br /> transfer_node_to_modifiers(node, modifiers, context, in_tree_view)<br /> <br /> # TODO remove attrs couterpart in modifiers when invisible is true ?<br />
链接;https://bugs.launchpad.net/openobject-server/+bug/920033