谢谢分享 :aplauso:
我顺便贴下代码:
odoo/__init__.py这个是用于unix系统
#----------------------------------------------------------
# libc UTC hack
#----------------------------------------------------------
# Make sure the OpenERP server runs in UTC.
import os
os.environ['TZ'] = 'UTC' # Set the timezone
import time
if hasattr(time, 'tzset'):
time.tzset()
odoo-bin这部分用于windows系统,因为在windows里通过修改环境变量来使time的时区改变必须在time模块被import前。
__import__('os').environ['TZ'] = 'UTC'
[quote author=Jeff link=topic=17529.msg31982#msg31982 date=1457440375]view type现在只支持 tree 和 form两个值tree是一个对象的多条记录按parent_id组织成一个树,可切换的只有树形和form两个view mode当view type为from时,view mode有7个可选值。你可以在任务的菜单里看到六种,第七种在工作流菜单里有[/quote]Hi @Jeff,谢谢指点。我后来翻看了系统中的window action,view_type属性为tree的很少,只有10个左右,正如你说的设成'tree'的作用是用[b]树形[/b]视图来展示有层级关系的列表,比如部门的层级结构,多公司中的母公司/子公司的层级结构等等。我也找到了官方对这个属性的解释:View type: Tree type to use for the tree view, set to 'tree' for a [b]hierarchical [/b]tree view, or 'form' for a regular list view如果这个属性叫做tree_type,值为'tree'或'list'就好理解了。