跳转至内容
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(Flatly)
  • 不使用皮肤
折叠

Odoo 中文社区

P

pen2g

@pen2g
关于
帖子
21
主题
10
群组
0
粉丝
0
关注
0

帖子

最新 最佳 有争议的

  • Openerp的gtk客户端万能查询功能中文bug
    P pen2g

    也不知道是不是BUG,也许是配置不对,请高手拍砖,我反正用下面方法解决问题了,以下是我的方法:
      GTK客户端与WEB客户端在增加过滤条件后,点击查询获得的结果不一致,根据后台数据库日志,可知GTK自定义的条件未提交.WEB客户端获得了正确的结果GTK却查询不出来,后台数据库日志捕获语句也不一样,相关图片见附件

    <br />根据不同的协议(net-rpc使用的是unicode,xml-rpc使用的是utf-8编码)OPENERP客户端储存了不同编码的值,而gtk客户端界面组件glade固定返回的编码为utf-8,在点击查找后,进行匹配时,无法找到对应的值,修改代码,将内存中全部转换为unicode,glade返回值也转换为unicode,修改如下(openerp-client-6.0.3/bin/widget_search/custom_filter.py):<br />fields = attrs.get(&#039;fields&#039;,None)<br />for item in fields:<br />#add by py 将索引字段强制换成unicode<br />self.field_selection[unicode(item[1])] = (item[0], item[2], item[3])<br />#以下为原来的代码<br />#self.field_selection[item[1]] = (item[0], item[2], item[3])<br />#end by py<br />self.combo_fields.append_text(item[1])<br /><br />self.combo_fields.set_active(0)<br /><br />for item in (&#91;&#039;ilike&#039;, _(&#039;contains&#039;)],<br />&#91;&#039;not ilike&#039;, _(&#039;doesn\&#039;t contain&#039;)],<br />&#91;&#039;=&#039;, _(&#039;is equal to&#039;)],<br />&#91;&#039;&lt;&gt;&#039;,_(&#039;is not equal to&#039;)],<br />&#91;&#039;&gt;&#039;,_(&#039;greater than&#039;)],<br />&#91;&#039;&lt;&#039;,_(&#039;less than&#039;)],<br />&#91;&#039;in&#039;,_(&#039;in&#039;)],<br />&#91;&#039;not in&#039;,_(&#039;not in&#039;)],<br />):<br />#add by py 将索引字段强制换成unicode<br />self.op_selection[unicode(item[1])] = item[0]<br />#以下为原来的代码<br />#self.op_selection[item[1]] = item[0]<br />#end by py<br />self.combo_op.append_text(item[1])<br /><br />self.combo_op.set_active(0)<br />false_value_domain = &#91;]<br />type_cast = {&#039;integer&#039;:lambda x:int(x),<br />&#039;float&#039;:lambda x:float(x),<br />&#039;boolean&#039;:lambda x:bool(eval(x)),<br />&#039;date&#039;:lambda x:(datetime.strptime(x, DT_FORMAT)).strftime(DT_FORMAT),<br />&#039;datetime&#039;:lambda x:(datetime.strptime(x, DHM_FORMAT)).strftime(DHM_FORMAT)<br />}<br />#add by py<br />field_left = self.field_selection[unicode(self.combo_fields.get_active_text())][0]<br />field_type = self.field_selection[unicode(self.combo_fields.get_active_text())][1]<br />operator = self.op_selection[unicode(self.combo_op.get_active_text())]<br />#以下为原来的代码<br />#field_left = self.field_selection[self.combo_fields.get_active_text()][0]<br />#field_type = self.field_selection[self.combo_fields.get_active_text()][1]<br />#operator = self.op_selection[self.combo_op.get_active_text()]<br />#end by py<br />right_text = self.right_text.get_text() or False <br />
    

  • 分享OE的数据库字典网页版
    P pen2g

    压缩后不大,直接下载看吧


  • 用模块的方法导入关联数据报错的问题
    P pen2g

    我将res.partner res.partner.address res.partner.contact都导进去了,在导res.partner.job时报错了。
    res.partner.job数据:

    id,contact_id:id,address_id:id,state,sequence_partner,sequence_contact,<br />partner_job77,contact_104,address_144,current,0,0
    



    报错信息

    Environment Information : <br />System : Linux-2.6.38-8-generic-i686-with-Ubuntu-11.04-natty<br />OS Name : posix<br />Distributor ID:	Ubuntu<br />Description:	Ubuntu 11.04<br />Release:	11.04<br />Codename:	natty<br />Operating System Release : 2.6.38-8-generic<br />Operating System Version : #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011<br />Operating System Architecture : 32bit<br />Operating System Locale : zh_CN.UTF8<br />Python Version : 2.7.1+<br />OpenERP-Client Version : 6.0.2<br />Last revision No. &amp; ID :Bazaar Package not Found !Traceback (most recent call last):<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/netsvc.py&quot;, line 489, in dispatch<br />&nbsp; &nbsp; result = ExportService.getService(service_name).dispatch(method, auth, params)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/service/web_services.py&quot;, line 596, in dispatch<br />&nbsp; &nbsp; security.check(db,uid,passwd)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/service/security.py&quot;, line 43, in check<br />&nbsp; &nbsp; pool = pooler.get_pool(db)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/pooler.py&quot;, line 79, in get_pool<br />&nbsp; &nbsp; pool = get_db_and_pool(db_name, force_demo, status, update_module)[1]<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/pooler.py&quot;, line 39, in get_db_and_pool<br />&nbsp; &nbsp; addons.load_modules(db, force_demo, status, update_module)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 883, in load_modules<br />&nbsp; &nbsp; processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 748, in load_module_graph<br />&nbsp; &nbsp; load_init_update_xml(cr, m, idref, mode, kind)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 635, in load_init_update_xml<br />&nbsp; &nbsp; tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode, noupdate=noupdate)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/tools/convert.py&quot;, line 947, in convert_csv_import<br />&nbsp; &nbsp; result, rows, warning_msg, dummy = pool.get(model).import_data(cr, uid, fields, datas,mode, module, noupdate, filename=fname_partial)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/osv/orm.py&quot;, line 868, in import_data<br />&nbsp; &nbsp; process_liness(self, datas, &#91;], current_module, self._name, fields_def, position=position)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/osv/orm.py&quot;, line 818, in process_liness<br />&nbsp; &nbsp; res = _get_id(relation, line[i], current_module, mode)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/osv/orm.py&quot;, line 732, in _get_id<br />&nbsp; &nbsp; record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/tools/misc.py&quot;, line 823, in cached_result<br />&nbsp; &nbsp; result2 = fn(self2, cr, *args[:self.skiparg-2], **kwargs2)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/base/ir/ir_model.py&quot;, line 602, in _get_id<br />&nbsp; &nbsp; raise ValueError(&#039;No references to %s.%s&#039; % (module, xml_id))<br />ValueError: No references to 208_20110622_partner.contact_104,address_144<br />
    

  • Web602csv导入客户信息不显示联系人问题
    P pen2g

    按照@mrshelly的指点,导入后,发现数据库有值,但界面上显示不了,有人说要打补丁,不知道去哪里打。
    [attachimg=1]
    [attachimg=2]


  • 开发环境在浏览器中点击模块菜单出错,大家帮忙看看什么问题?
    P pen2g

    自已解决了,将vmware 6.5.3升级到7.1.4后再打开就没这个问题了。


  • 开发环境在浏览器中点击模块菜单出错,大家帮忙看看什么问题?
    P pen2g

    测试发现,把虚拟机拷到另一台机器上,运行正常,创建虚拟机时的主机是双核,后面升级成4核才出的问题,难道跟虚拟机所在主机配置变化有关系?


  • 开发环境在浏览器中点击模块菜单出错,大家帮忙看看什么问题?
    P pen2g

    同一操作,在服务器用FIREFOX没问题,在另外一台LINUX上用FIREFOX也没问题,就是在WINDOWS上装的FIREFOX就报这个错

    A problem occurred in a Python script.&nbsp; Here is the sequence of<br />function calls leading up to the error, in the order they occurred.<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py in respond(self=&lt;cherrypy._cprequest.Request object at 0x95dcd8c&gt;, path_info=&#039;/openerp/tree/data&#039;)<br />&nbsp; 598&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  self.hooks.run(&#039;before_request_body&#039;)<br />&nbsp; 599&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if self.process_request_body:<br />&nbsp; 600&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  self.process_body()<br />&nbsp; 601 <br />&nbsp; 602&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  self.stage = &#039;before_handler&#039;<br />self = &lt;cherrypy._cprequest.Request object at 0x95dcd8c&gt;<br />self.process_body = &lt;bound method Request.process_body of &lt;cherrypy._cprequest.Request object at 0x95dcd8c&gt;&gt;<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py in process_body(self=&lt;cherrypy._cprequest.Request object at 0x95dcd8c&gt;)<br />&nbsp; 720&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # FieldStorage only recognizes POST.<br />&nbsp; 721&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  environ={&#039;REQUEST_METHOD&#039;: &quot;POST&quot;},<br />&nbsp; 722&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  keep_blank_values=1)<br />&nbsp; 723&nbsp; &nbsp; &nbsp; &nbsp;  except Exception, e:<br />&nbsp; 724&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if e.__class__.__name__ == &#039;MaxSizeExceeded&#039;:<br />keep_blank_values undefined<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpcgifs.py in __init__(self=FieldStorage(None, None, None), *args=(), **kwds={&#039;environ&#039;: {&#039;REQUEST_METHOD&#039;: &#039;POST&#039;}, &#039;fp&#039;: &lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;, &#039;headers&#039;: {&#039;Remote-Addr&#039;: &#039;192.168.1.224&#039;, &#039;Content-Length...pplication/x-www-form-urlencoded; charset=UTF-8&#039;}, &#039;keep_blank_values&#039;: 1})<br />&nbsp; &nbsp; 6&nbsp; &nbsp;  def __init__(self, *args, **kwds):<br />&nbsp; &nbsp; 7&nbsp; &nbsp; &nbsp; &nbsp;  try:<br />&nbsp; &nbsp; 8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  cgi.FieldStorage.__init__(self, *args, **kwds)<br />&nbsp; &nbsp; 9&nbsp; &nbsp; &nbsp; &nbsp;  except ValueError, ex:<br />&nbsp;  10&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if str(ex) == &#039;Maximum content length exceeded&#039;:<br />global cgi = &lt;module &#039;cgi&#039; from &#039;/usr/lib/python2.6/cgi.pyc&#039;&gt;<br />cgi.FieldStorage = &lt;class cgi.FieldStorage at 0x82f2bcc&gt;<br />cgi.FieldStorage.__init__ = &lt;unbound method FieldStorage.__init__&gt;<br />self = FieldStorage(None, None, None)<br />args = ()<br />kwds = {&#039;environ&#039;: {&#039;REQUEST_METHOD&#039;: &#039;POST&#039;}, &#039;fp&#039;: &lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;, &#039;headers&#039;: {&#039;Remote-Addr&#039;: &#039;192.168.1.224&#039;, &#039;Content-Length...pplication/x-www-form-urlencoded; charset=UTF-8&#039;}, &#039;keep_blank_values&#039;: 1}<br /><br /> /usr/lib/python2.6/cgi.py in __init__(self=FieldStorage(None, None, None), fp=&lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;, headers={&#039;Remote-Addr&#039;: &#039;192.168.1.224&#039;, &#039;Content-Length...pplication/x-www-form-urlencoded; charset=UTF-8&#039;}, outerboundary=&#039;&#039;, environ={&#039;REQUEST_METHOD&#039;: &#039;POST&#039;}, keep_blank_values=1, strict_parsing=0)<br />&nbsp; 504&nbsp; &nbsp; &nbsp; &nbsp;  self.done = 0<br />&nbsp; 505&nbsp; &nbsp; &nbsp; &nbsp;  if ctype == &#039;application/x-www-form-urlencoded&#039;:<br />&nbsp; 506&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  self.read_urlencoded()<br />&nbsp; 507&nbsp; &nbsp; &nbsp; &nbsp;  elif ctype[:10] == &#039;multipart/&#039;:<br />&nbsp; 508&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  self.read_multi(environ, keep_blank_values, strict_parsing)<br />self = FieldStorage(None, None, None)<br />self.read_urlencoded = &lt;bound method FieldStorage.read_urlencoded of FieldStorage(None, None, None)&gt;<br /><br /> /usr/lib/python2.6/cgi.py in read_urlencoded(self=FieldStorage(None, None, None))<br />&nbsp; 605&nbsp; &nbsp;  def read_urlencoded(self):<br />&nbsp; 606&nbsp; &nbsp; &nbsp; &nbsp;  &quot;&quot;&quot;Internal: read data in query string format.&quot;&quot;&quot;<br />&nbsp; 607&nbsp; &nbsp; &nbsp; &nbsp;  qs = self.fp.read(self.length)<br />&nbsp; 608&nbsp; &nbsp; &nbsp; &nbsp;  if self.qs_on_post:<br />&nbsp; 609&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  qs += &#039;&amp;&#039; + self.qs_on_post<br />qs undefined<br />self = FieldStorage(None, None, None)<br />self.fp = &lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;<br />self.fp.read = &lt;bound method SizeCheckWrapper.read of &lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;&gt;<br />self.length = 17713<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py in read(self=&lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;, size=17713)<br />&nbsp; 197 <br />&nbsp; 198&nbsp; &nbsp;  def read(self, size=None):<br />&nbsp; 199&nbsp; &nbsp; &nbsp; &nbsp;  data = self.rfile.read(size)<br />&nbsp; 200&nbsp; &nbsp; &nbsp; &nbsp;  self.bytes_read += len(data)<br />&nbsp; 201&nbsp; &nbsp; &nbsp; &nbsp;  self._check_length()<br />data undefined<br />self = &lt;cherrypy.wsgiserver.SizeCheckWrapper object at 0x964efcc&gt;<br />self.rfile = &lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;<br />self.rfile.read = &lt;bound method CP_fileobject.read of &lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;&gt;<br />size = 17713<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py in read(self=&lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;, size=17713)<br />&nbsp; 789&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # as we copy it into a StringIO and free it.&nbsp; This avoids<br />&nbsp; 790&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  # fragmentation issues on many platforms.<br />&nbsp; 791&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  data = self.recv(left)<br />&nbsp; 792&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if not data:<br />&nbsp; 793&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  break<br />data undefined<br />self = &lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;<br />self.recv = &lt;bound method CP_fileobject.recv of &lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;&gt;<br />left = 14000<br /><br /> /usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py in recv(self=&lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;, size=14000)<br />&nbsp; 745&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  while True:<br />&nbsp; 746&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  try:<br />&nbsp; 747&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  return self._sock.recv(size)<br />&nbsp; 748&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  except socket.error, e:<br />&nbsp; 749&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  if (e.args[0] not in socket_errors_nonblocking<br />self = &lt;cherrypy.wsgiserver.CP_fileobject object at 0x943c22c&gt;<br />self._sock = &lt;socket._socketobject object at 0x8f104fc&gt;<br />self._sock.recv = &lt;built-in method recv of _socket.socket object at 0x87da638&gt;<br />size = 14000<br />&lt;class &#039;socket.timeout&#039;&gt;: timed out<br />&nbsp; &nbsp; __class__ = &lt;class &#039;socket.timeout&#039;&gt;<br />&nbsp; &nbsp; __delattr__ = &lt;method-wrapper &#039;__delattr__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __dict__ = {}<br />&nbsp; &nbsp; __doc__ = None<br />&nbsp; &nbsp; __format__ = &lt;built-in method __format__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __getattribute__ = &lt;method-wrapper &#039;__getattribute__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __getitem__ = &lt;method-wrapper &#039;__getitem__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __getslice__ = &lt;method-wrapper &#039;__getslice__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __hash__ = &lt;method-wrapper &#039;__hash__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __init__ = &lt;method-wrapper &#039;__init__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __module__ = &#039;socket&#039;<br />&nbsp; &nbsp; __new__ = &lt;built-in method __new__ of type object at 0x24fc60&gt;<br />&nbsp; &nbsp; __reduce__ = &lt;built-in method __reduce__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __reduce_ex__ = &lt;built-in method __reduce_ex__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __repr__ = &lt;method-wrapper &#039;__repr__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __setattr__ = &lt;method-wrapper &#039;__setattr__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __setstate__ = &lt;built-in method __setstate__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __sizeof__ = &lt;built-in method __sizeof__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __str__ = &lt;method-wrapper &#039;__str__&#039; of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __subclasshook__ = &lt;built-in method __subclasshook__ of type object at 0x81f56a4&gt;<br />&nbsp; &nbsp; __unicode__ = &lt;built-in method __unicode__ of timeout object at 0x85169ec&gt;<br />&nbsp; &nbsp; __weakref__ = None<br />&nbsp; &nbsp; args = (&#039;timed out&#039;,)<br />&nbsp; &nbsp; errno = None<br />&nbsp; &nbsp; filename = None<br />&nbsp; &nbsp; message = &#039;timed out&#039;<br />&nbsp; &nbsp; strerror = None<br /><br />The above is a description of an error in a Python program.&nbsp; Here is<br />the original traceback:<br /><br />Traceback (most recent call last):<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py&quot;, line 600, in respond<br />&nbsp; &nbsp; self.process_body()<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cprequest.py&quot;, line 722, in process_body<br />&nbsp; &nbsp; keep_blank_values=1)<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpcgifs.py&quot;, line 8, in __init__<br />&nbsp; &nbsp; cgi.FieldStorage.__init__(self, *args, **kwds)<br />&nbsp; File &quot;/usr/lib/python2.6/cgi.py&quot;, line 506, in __init__<br />&nbsp; &nbsp; self.read_urlencoded()<br />&nbsp; File &quot;/usr/lib/python2.6/cgi.py&quot;, line 607, in read_urlencoded<br />&nbsp; &nbsp; qs = self.fp.read(self.length)<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py&quot;, line 199, in read<br />&nbsp; &nbsp; data = self.rfile.read(size)<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py&quot;, line 791, in read<br />&nbsp; &nbsp; data = self.recv(left)<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/wsgiserver/__init__.py&quot;, line 747, in recv<br />&nbsp; &nbsp; return self._sock.recv(size)<br />timeout: timed out<br /><br /><br />192.168.1.224 - - [20/Jun/2011:18:23:27] &quot;POST /openerp/tree/data HTTP/1.1&quot; 500 17990 &quot;http://192.168.1.117:8080/openerp/menu?active=376&quot; &quot;Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3&quot;<br />[20/Jun/2011:18:23:45] HTTP <br />Request Headers:<br />&nbsp; REFERER: [检测到链接无效,已移除] br />&nbsp; Content-Length: 17713<br />&nbsp; ACCEPT-CHARSET: GB2312,utf-8;q=0.7,*;q=0.7<br />&nbsp; USER-AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3<br />&nbsp; CONNECTION: keep-alive<br />&nbsp; COOKIE: session_id=e73442bee744bdc1e5c2c4505ebe8c08d58fa2be; terp_db=PCB; terp_user=admin<br />&nbsp; Remote-Addr: 192.168.1.224<br />&nbsp; PRAGMA: no-cache<br />&nbsp; HOST: 192.168.1.117:8080<br />&nbsp; CACHE-CONTROL: no-cache<br />&nbsp; ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br />&nbsp; ACCEPT-LANGUAGE: zh-cn,zh;q=0.5<br />&nbsp; Content-Type: application/x-www-form-urlencoded; charset=UTF-8<br />&nbsp; ACCEPT-ENCODING: gzip,deflate<br />&nbsp; KEEP-ALIVE: 300<br />[20/Jun/2011:18:23:45] HTTP &lt;class &#039;socket.timeout&#039;&gt;<br />Python 2.6.2: /usr/bin/python2.6<br />Mon Jun 20 18:23:45 2011
    

  • 源码运行初始化数据库时发生错误!
    P pen2g

    是root_path的问题,将openerp_serverrc的
    root_path=/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng
    改成源代码的bin目录就可以了!
    感谢二位的回贴!


  • 源码运行初始化数据库时发生错误!
    P pen2g

    哪位帮忙看下:
    运行下列命令后出的问题:
    python ./bin/openerp-server.py -r openerp -w openerp --db_host 127.0.0.1 --init all

    [2011-06-17 21:18:05,005][openerp] INFO:init:module base: loading objects<br />[2011-06-17 21:18:05,006][openerp] INFO:init:module base: registering objects<br />[2011-06-17 21:18:05,365][openerp] INFO:init:module base: creating or updating database tables<br />[2011-06-17 21:18:09,587][openerp] INFO:init:module base: loading base_data.xml<br />Traceback (most recent call last):<br />&nbsp; File &quot;./bin/openerp-server.py&quot;, line 121, in &lt;module&gt;<br />&nbsp; &nbsp; db,pool = pooler.get_db_and_pool(dbname, update_module=tools.config&#91;&#039;init&#039;] or tools.config&#91;&#039;update&#039;], pooljobs=False)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/pooler.py&quot;, line 39, in get_db_and_pool<br />&nbsp; &nbsp; addons.load_modules(db, force_demo, status, update_module)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 833, in load_modules<br />&nbsp; &nbsp; processed_modules.extend(load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report))<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 748, in load_module_graph<br />&nbsp; &nbsp; load_init_update_xml(cr, m, idref, mode, kind)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/addons/__init__.py&quot;, line 641, in load_init_update_xml<br />&nbsp; &nbsp; tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs)<br />&nbsp; File &quot;/home/pengyong/workspace/openerp-server602/bin/tools/convert.py&quot;, line 963, in convert_xml_import<br />&nbsp; &nbsp; etree.parse(os.path.join(config&#91;&#039;root_path&#039;],&#039;import_xml.rng&#039; )))<br />&nbsp; File &quot;lxml.etree.pyx&quot;, line 2942, in lxml.etree.parse (src/lxml/lxml.etree.c:54187)<br />&nbsp; File &quot;parser.pxi&quot;, line 1528, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:79485)<br />&nbsp; File &quot;parser.pxi&quot;, line 1557, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:79768)<br />&nbsp; File &quot;parser.pxi&quot;, line 1457, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:78843)<br />&nbsp; File &quot;parser.pxi&quot;, line 997, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:75698)<br />&nbsp; File &quot;parser.pxi&quot;, line 564, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:71739)<br />&nbsp; File &quot;parser.pxi&quot;, line 645, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:72614)<br />&nbsp; File &quot;parser.pxi&quot;, line 583, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:71927)<br />IOError: Error reading file &#039;/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng&#039;: failed to load external entity &quot;/usr/lib/python2.7/dist-packages/openerp-server/import_xml.rng&quot;
    

  • 6.0.2数据库恢复到另一台主机,自定义的对象丢失问题
    P pen2g

    OK,懂了,感谢热心的朋友!


  • 6.0.2数据库恢复到另一台主机,自定义的对象丢失问题
    P pen2g

    听说要备份3样东西才行,数据库/addon目录/配置文件,没错吧?


  • 6.0.2数据库恢复到另一台主机,自定义的对象丢失问题
    P pen2g

    本来在WINDOWS环境上用的,后来听说LINUX上跑快,就装了一台虚拟机CENTOS,所有软件版本都相同,恢复上去能登陆进去,就是点开自定义的模块(老肖的请假单)时,报错了‘Object qingjia.qingjd doesn't exist’,难道这个对象没在数据库里?
    我在系统管理里面都能看到模块,在底层对象里也能找到qingjia.qingjd,界面上就是打不开。服务器日志如下:

    [2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;active_id&#039;: 377,<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;active_ids&#039;: [377],<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;active_model&#039;: &#039;ir.ui.menu&#039;,<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;client&#039;: &#039;web&#039;,<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;department_id&#039;: False,<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;lang&#039;: u&#039;zh_CN&#039;,<br />[2011-06-11 08:53:48,944][?] DEBUG_RPC:params:&nbsp; &#039;project_id&#039;: False,<br />[2011-06-11 08:53:48,945][?] DEBUG_RPC:params:&nbsp; &#039;section_id&#039;: False,<br />[2011-06-11 08:53:48,945][?] DEBUG_RPC:params:&nbsp; &#039;tz&#039;: False},<br />[2011-06-11 08:53:48,945][?] DEBUG_RPC:params: True,<br />[2011-06-11 08:53:48,945][?] DEBUG_RPC:params: False]<br />[2011-06-11 08:53:48,945][PCB] DEBUG_RPC:exception:u&quot;warning -- Object Error\n\nObject qingjia.qingjd doesn&#039;t exist&quot;<br />[2011-06-11 08:53:48,946][PCB] DEBUG:web-services:netrpc: rpc-dispatching exception<br />Traceback (most recent call last):<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/openerp-server/service/netrpc_server.py&quot;, line 70, in run<br />&nbsp; &nbsp; result = self.dispatch(msg[0], msg[1], msg[2:])<br />&nbsp; File &quot;/usr/lib/python2.6/site-packages/openerp-server/netsvc.py&quot;, line 499, in dispatch<br />&nbsp; &nbsp; raise OpenERPDispatcherException(e, tb_s)<br />OpenERPDispatcherException<br />
    


  • 能不能在请假单创建后,在送批的ACTION里控制请假天数?
    P pen2g

    就是想请教在送批中怎么加代码控制?


  • 如何在请假条审批后,生成工资扣款!
    P pen2g

    模块没有,自己就不能加啊,我们也可以给开源做贡献啊! ;D


  • 能不能在请假单创建后,在送批的ACTION里控制请假天数?
    P pen2g

    那复杂一点,比如说检测到该员工,本月请过10天假了,公司规定不能再请了,该怎么弄?只能写代码了吧?


  • 能不能在请假单创建后,在送批的ACTION里控制请假天数?
    P pen2g

    如,若输入超过30天的报错,送批不成功
    如题,纯技术角度,请指点下小弟!


  • 如何在请假条审批后,生成工资扣款!
    P pen2g

    说的是技术,楼上犯不着那样,如果没这机制,员工天天请假玩去了


  • 如何在请假条审批后,生成工资扣款!
    P pen2g

    我的意思是一个人请了几天假,直接就进入财务的工资模块,等到月底,财务直接确认就可以了,如何在代码中实现?这也是一个module生成另一个module的单据的过程,oe如何实现?


  • 如何控制的数字控件按要求输入?
    P pen2g

    此问题在GTK客户端运行正常,在WEB下没反应,网上搜到,有人提交了这个BUG<br / https://bugs.launchpad.net/openobject-client-web/+bug/789121 br />Bug Description
    .This work fin with gtk 6.0.2 , onchange function is not started with web client 6.0.2
    It's important, my prospect use only web client!


  • 如何控制的数字控件按要求输入?
    P pen2g

    感谢版主,解决了。不过答案少了个符号(在月字后)。正确的代码如下:

     warning = {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;title&#039;: _(&#039;Error!&#039;),<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;message&#039;: _(&#039;不允许请假超过一个月.&#039;)<br />&nbsp; &nbsp; &nbsp;  }<br />&nbsp; &nbsp; &nbsp;  return {&#039;value&#039;:{&#039;tians&#039;:30},&#039;warning&#039;: warning}
    
  • 登录

  • 没有帐号? 注册

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 版块
  • 标签
  • 热门
  • 用户
  • 群组