我想使用域过滤器表达式过滤OPENERP中的recods
在recored我有一个用户列表的字段,所以我想得到用户登录列表的记录
[(user.id , 'in' , 'user_ids')]
Run Code Online (Sandbox Code Playgroud)
这不起作用
它返回此错误:
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2356, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4846, in _search
self._apply_ir_rules(cr, user, query, 'read', context=context)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4728, in _apply_ir_rules
rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context)
File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
query = self.pool.get(model_name)._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4676, in _where_calc
e = expression.expression(cr, user, domain, self, context)
File "/usr/lib/pymodules/python2.7/openerp/osv/expression.py", line 632, in …Run Code Online (Sandbox Code Playgroud) 我尝试创建一个关于OpenERP的报告.有几种方法可以执行此任务(openoffice插件,XML文件,RML文件等)
什么是最快的方式(和/或最美丽的)?
我正在寻找一种方法来覆盖一些openerp web js核心功能,如"on_logout".
文档缺乏说明(正如你在我的帖子中看到的)和helloworld模块告诉你,你可以这样做
openerp.web_hello = function(openerp) {
openerp.web.SearchView = openerp.web.SearchView.extend({
init:function() {
this._super.apply(this,arguments);
this.on_search.add(function(){console.log('hello');});
}
});
// here you may tweak globals object, if any, and play with on_* or do_* callbacks on them
openerp.web.Login = openerp.web.Login.extend({
start: function() {
console.log('Hello there');
this._super.apply(this,arguments);
}
});
};
Run Code Online (Sandbox Code Playgroud)
在我的模块中,我这样做:
openerp.mytest = function(openerp){
openerp.web.WebClient = openerp.web.WebClient.extend({
on_logout: function() {
alert('mine');
[...]
},
});
}
Run Code Online (Sandbox Code Playgroud)
我知道js已加载,因为在此定义之外放置警报是有效的.
这有什么不对?
我需要根据对象的工作流状态为对象设置不同的权限.例如,'manager group'只能在state = draft时编辑对象,但如果state = validated,'super manager group'也可以编辑它.
似乎不可能使用ir.model.access,我正在评估是否可以使用ir.rule.好像不是......
有没有official办法得到这个或我需要实现这个功能(可能通过在ir.model.access机器中添加一个条件).
我正在使用Plone 4.0.1,我正在尝试使用c.googleanalytics 1.1.
在文档之后,我在Google帐户上注册了我的域名,并获得了"OAuth Consumer Key"和"OAuth Consumer Secret".
现在,每次我尝试访问门户网站(无论用户),我都会得到:
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module zope.formlib.form, line 782, in __call__
Module five.formlib.formbase, line 50, in update
Module zope.formlib.form, line 745, in update
Module plone.fieldsets.form, line 24, in setUpWidgets
Module zope.formlib.form, line 384, in setUpEditWidgets
Module zope.schema._field, line 291, in bind
Module Products.Five.schema, line 36, in get
Module collective.googleanalytics.vocabularies, line 45, in getWebProperties
Module plone.memoize.volatile, …Run Code Online (Sandbox Code Playgroud)