新手请进(openERP应用和开发基础)
-
非常感谢楼主,学习中,有机会我也贡献下力量
-
谢谢老肖同志
辛苦了。 -
谢谢楼主,楼主辛苦了~
-
肖大侠,
我在根据你写的OpenERP应用和开发基础学习openerp,其中第六章的例子安装成功后点击相应的功能比如:我的请假单(任何一个功能)都报编码错误,详细错误请参考下面,由于对openerp和python不太熟悉,不知道怎么修改或处理,请指点一下,非常感谢!
我的openerp版本为:openerp-allinone-setup-5.0.14.exe
具体错误如下:Traceback (most recent call last):
File "netsvc.pyo", line 256, in dispatch
File "netsvc.pyo", line 76, in call
File "service\web_services.pyo", line 577, in execute
File "osv\osv.pyo", line 58, in wrapper
File "osv\osv.pyo", line 119, in execute
File "osv\osv.pyo", line 111, in execute_cr
File "osv\orm.pyo", line 1372, in fields_view_get
File "osv\orm.pyo", line 1117, in __view_look_dom_arch
File "osv\orm.pyo", line 1104, in __view_look_dom
File "lxml.etree.pyx", line 641, in lxml.etree._Element.set (src/lxml/lxml.etree.c:9596)
File "apihelpers.pxi", line 416, in lxml.etree._setAttributeValue (src/lxml/lxml.etree.c:31761)
File "apihelpers.pxi", line 1136, in lxml.etree._utf8 (src/lxml/lxml.etree.c:37215)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes -
[quote author=ya888g link=topic=756.msg6958#msg6958 date=1286371696]
肖大侠,
我在根据你写的OpenERP应用和开发基础学习openerp,其中第六章的例子安装成功后点击相应的功能比如:我的请假单(任何一个功能)都报编码错误,详细错误请参考下面,由于对openerp和python不太熟悉,不知道怎么修改或处理,请指点一下,非常感谢!
我的openerp版本为:openerp-allinone-setup-5.0.14.exe
具体错误如下:Traceback (most recent call last):
File "netsvc.pyo", line 256, in dispatch
File "netsvc.pyo", line 76, in call
File "service\web_services.pyo", line 577, in execute
File "osv\osv.pyo", line 58, in wrapper
File "osv\osv.pyo", line 119, in execute
File "osv\osv.pyo", line 111, in execute_cr
File "osv\orm.pyo", line 1372, in fields_view_get
File "osv\orm.pyo", line 1117, in __view_look_dom_arch
File "osv\orm.pyo", line 1104, in __view_look_dom
File "lxml.etree.pyx", line 641, in lxml.etree._Element.set (src/lxml/lxml.etree.c:9596)
File "apihelpers.pxi", line 416, in lxml.etree._setAttributeValue (src/lxml/lxml.etree.c:31761)
File "apihelpers.pxi", line 1136, in lxml.etree._utf8 (src/lxml/lxml.etree.c:37215)
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes
[/quote]
我也出现一样的错误
按以下bug处理应该能够解决,搞了一下午.
https://bugs.launchpad.net/openobject-server/+bug/617484 -
[quote author=stbrine link=topic=756.msg7073#msg7073 date=1288689229]
我也出现一样的错误
按以下bug处理应该能够解决,搞了一下午.<br / https://bugs.launchpad.net/openobject-server/+bug/617484 br />[/quote]
不错 赞一个...
官方的代码中. 地雷不少.. -
Domain 条件表达式写法
标记:
Domain 条件表达式写法在《openERP应用和开发基础V2》第124页
[b]在5.14版中按老肖的写法会出现错误[/b]
[color=green]以下是正确的例子,使用()元组,而不是[][/color]
('&',('purchase_line_id','!=',False),('date_planned', '>=', from_date))
[b]search方法:查询符合条件的记录。[/b]
格式:def search(cr, user, args, offset=0, limit=None, order=None, context=None, count=False)¶
参数说明:
args: 包含检索条件的tuples列表,格式为: [('name_of_the_field', 'operator', value), ...]。可用的operators有:
=, !=, >, >=, <, <=, like, ilike, in, not in, child_of, parent_left, parent_right