在action定义里面写context,传入uid,如何在ui视图获取当前用户?
a136794drt
-
创建人为当前用户则显示,其余人则隐藏按钮 -
如何实现多选框效果?如题,在线等。我只见过单选下拉列表的情况,多选框不知道如何实现啊?有没有大神指导一下,感激不尽。
-
在Ununtu Server12.04安装了Odoo9.0,启动服务后,进入127.0.0.1后台报错!!!恩,新安装的,不知道是怎么回事。另外问一下github上的master是10.0吗?现在还是玩8.0吧,9.0等稳定版再上了,折腾了这几天安装伤不起啊。
-
在Ununtu Server12.04安装了Odoo9.0,启动服务后,进入127.0.0.1后台报错!!!如题,源代码是在github上下载的9.0,安装教程参照了论坛上的方法。VMBox里面安装的Odoo9.0,端口转发是8069——>80,5432———>5400
打开浏览器输入127.0.0.1服务器报错,错误信息如下:
2015-10-15 06:57:35,309 2338 INFO test openerp.modules.loading: loading base/security/base_security.xml
2015-10-15 06:57:35,342 2338 INFO test werkzeug: 10.0.2.2 - - [15/Oct/2015 06:57:35] "GET / HTTP/1.1" 500 -
2015-10-15 06:57:35,369 2338 ERROR test werkzeug: Error on request:
Traceback (most recent call last):
File "/usr/share/pyshared/werkzeug/serving.py", line 159, in run_wsgi
execute(app)
File "/usr/share/pyshared/werkzeug/serving.py", line 146, in execute
application_iter = app(environ, start_response)
File "/home/mes/odoo-9.0/openerp/service/server.py", line 245, in app
return self.app(e, s)
File "/home/mes/odoo-9.0/openerp/service/wsgi_server.py", line 184, in application
return application_unproxied(environ, start_response)
File "/home/mes/odoo-9.0/openerp/service/wsgi_server.py", line 170, in application_unproxied
result = handler(environ, start_response)
File "/home/mes/odoo-9.0/openerp/http.py", line 1416, in call
return self.dispatch(environ, start_response)
File "/home/mes/odoo-9.0/openerp/http.py", line 1390, in call
return self.app(environ, start_wrapped)
File "/usr/share/pyshared/werkzeug/wsgi.py", line 411, in call
return self.app(environ, start_response)
File "/home/mes/odoo-9.0/openerp/http.py", line 1565, in dispatch
ir_http = request.registry['ir.http']
File "/home/mes/odoo-9.0/openerp/http.py", line 354, in registry
return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
File "/home/mes/odoo-9.0/openerp/modules/registry.py", line 335, in get
update_module)
File "/home/mes/odoo-9.0/openerp/modules/registry.py", line 366, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/mes/odoo-9.0/openerp/modules/loading.py", line 279, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "/home/mes/odoo-9.0/openerp/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/mes/odoo-9.0/openerp/modules/loading.py", line 98, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/mes/odoo-9.0/openerp/tools/convert.py", line 852, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/mes/odoo-9.0/openerp/tools/convert.py", line 939, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/mes/odoo-9.0/openerp/tools/convert.py", line 802, in parse
self.parse(rec, mode)
File "/home/mes/odoo-9.0/openerp/tools/convert.py", line 805, in parse
self._tags[rec.tag](self.cr, rec, de, mode=mode)
File "/home/mes/odoo-9.0/openerp/tools/convert.py", line 709, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/ir/ir_model.py", line 1105, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 729, in create
res = super(groups_view, self).create(cr, uid, values, context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 621, in create
self.write(cr, uid, [gid], {'users': users}, context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 736, in write
res = super(groups_view, self).write(cr, uid, ids, values, context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 625, in write
res = super(groups_implied, self).write(cr, uid, ids, values, context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 117, in write
res = super(res_groups, self).write(cr, uid, ids, vals, context=context)
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/api.py", line 345, in old_api
result = method(recs, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/models.py", line 3801, in write
self._write(old_vals)
File "/home/mes/odoo-9.0/openerp/api.py", line 221, in wrapper
return new_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/api.py", line 538, in new_api
result = method(self._model, cr, uid, self.ids, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/models.py", line 3849, in _write
result = self.store_get_values(cr, user, ids, vals.keys(), context) or []
File "/home/mes/odoo-9.0/openerp/api.py", line 223, in wrapper
return old_api(self, *args, **kwargs)
File "/home/mes/odoo-9.0/openerp/models.py", line 4364, in store_get_values
target_id_results[target_func_id] = [i for i in store_trigger[target_ids_func](self, cr, SUPERUSER_ID, ids, context) if i]
File "/home/mes/odoo-9.0/openerp/addons/base/res/res_users.py", line 171, in _get_users_from_group
groups = [g for g in groups if g == group_user or group_user in g.trans_implied_ids]
File "/home/mes/odoo-9.0/openerp/models.py", line 5573, in contains
raise TypeError("Mixing apples and oranges: %s in %s" % (item, self))
ParseError: "Mixing apples and oranges: None in res.groups(41, 40)" while parsing /home/mes/odoo-9.0/openerp/addons/base/security/base_security.xml:18, near
<record model="res.groups" id="group_system">
<field name="name">Settings</field>
<field name="implied_ids" eval="[(4, ref('group_erp_manager'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
还请大神帮忙看看,源码没有改过。 -
翻译加整理:ubuntu server 14.04 odoo9 安装简要[color=green]"小插曲:官方的文档,强制要求python 版本为2.7.9 我发现 我14.04.3下 python 是2.7.6
升级到2.7.9 原2.7.6 的好像还是在的,而且 odoo运行反而有些依赖包会找不到,我判断网上搜到的升级方法
估计 路径不一样了。"[/color]
上面的说法不妥,官方文档没有强制要求2.7.9,只是在windows下需要,linux下python2.7就够了。昨天按照你的方法将python升级后替换系统默认的python出现了问题,很多包都要重新安装,折腾很久。今天重新弄个虚拟机未升级python,安装9.0成功。mark一下。 -
紧急求助:ODOO安装后数据库管理界面异常创建数据库完了没有菜单?浏览器最好用Chrome或火狐
-
Openerp 中的 domaindomain好像并不适用model中的one2many字段,试过多次,没有过滤。
-
Win32安装绿色版oe8,安装成功后启动页面到Odoo登陆页面已经解决,主要问题是我的IE版本太低,换了Chrome就好了。
-
Openerp在win7下安装过程,及问题总结文不对题。
-
Win32安装绿色版oe8,安装成功后启动页面到Odoo登陆页面如题,安装成功后http://127.0.0.1:806直接调到Odoo登陆界面怎么解决?求帮忙,万分感谢。
PS:数据库已经自己创建了,后台没有报错。 -
GreenOpenERP -- 绿色版 OpenERP for windows/linux , 源码运行 解压即用到了Odoo登陆页面进不去,之后怎么弄啊