Odoo中文社区可以通过以下三个域名访问:shine-it.net , odoocn.org,odoo.net.cn

原论坛用户的基本信息和发帖这里都予以保留,请注意:原论坛用户无需重新注册新用户,但是您的密码需要重置

开发人员可以登录gitter讨论组: http://gitter.im/odoo-china/Talk, 需要github账号

如果您登录系统碰到问题,请在微信公众号留言:

OpenERP 报价单转订单时出错



  • OpenERP 报价单转订单时出错

    报价单保存OK, 点订单确认时出现以下错误

    OpenERP Server Error
    Client Traceback (most recent call last):
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\http.py", line 204, in dispatch
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\controllers\main.py", line 1132, in call_button
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\controllers\main.py", line 1120, in _call_kw
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\session.py", line 42, in proxy
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\session.py", line 30, in proxy_method
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\session.py", line 103, in send


    Server Traceback (most recent call last):
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\web\session.py", line 89, in send
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\netsvc.py", line 292, in dispatch_rpc
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\service\web_services.py", line 626, in dispatch
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\osv.py", line 188, in execute_kw
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\osv.py", line 131, in wrapper
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\osv.py", line 197, in execute
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\osv.py", line 185, in execute_cr
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\portal_sale\portal_sale.py", line 64, in action_button_confirm
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\sale\sale.py", line 577, in action_button_confirm
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\wkf_service.py", line 119, in trg_validate
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\instance.py", line 43, in validate
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 60, in process
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 40, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 60, in process
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 40, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 60, in process
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 175, in _split_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 183, in _join_test
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 40, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 52, in process
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\workitem.py", line 106, in _execute
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\wkf_expr.py", line 67, in execute
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\workflow\wkf_expr.py", line 57, in _eval_expr
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\tools\safe_eval.py", line 241, in safe_eval
      File "", line 1, in <module>
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\orm.py", line 374, in function_proxy
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\sale_stock\sale_stock.py", line 447, in action_ship_create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\sale_stock\sale_stock.py", line 415, in _create_pickings_and_procurements
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\stock\stock.py", line 622, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\mail\mail_thread.py", line 242, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\orm.py", line 4319, in create
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\orm.py", line 2489, in _add_missing_default_values
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server.\openerp\osv\orm.py", line 1583, in default_get
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\delivery\stock.py", line 140, in <lambda>
      File "C:\Program Files (x86)\OpenERP 7.0-20130828-231133\Server\server\openerp\addons\delivery\stock.py", line 138, in _get_default_uom
    IndexError: list index out of range



  • 用系统默认的服务是可以的,但自己建的物料就不行了。



  • 该产品的相关单位没有配置好. 或者你修改过 计量单位..



  • 重量 的单位必须是“重量”这个单位类别里换算比率为1的那个单位

    你是不是把公斤(kg)删除了?



  • 是的有修改过计量单位,并且把Kg删除了,重建可以吗?

    一开始建物料时不小心单位建成件,无论如何也改不了Kg,说是不在计量单位组的不可更改,索性删除Kg,建立Kg/单件,看来是这里有问题了。

    这里的问题是导至需求单无法建生成,所以出现错误。


  • 管理员

    如果没有删除重量的单位分类(Unit of Measure Categories),添加KG后挂到 Weight上就可以,如果已经删除了Weight。
    因为是它是通过xml关联的,只添加数据是不行的。在手动添加完Weight之后,先查看Weight的数据库id,你可以通过url查看,一般是id=?? 或者在登陆开发者模式后在开发者菜单点击 View Log

    应该到Settings / Configuration / Sequences & Identifiers / External Identifiers 搜索 “product_uom_categ_kgm” 如果找到则把Record ID改为你新的Weight id,如果没找到则新建

    Module: product
    External Identifier: product_uom_categ_kgm
    Model Name: product.uom.categ
    Record ID: Weight的数据库id



  • 首先感谢各位的热情回复,
    重新建立Kg/重量后错误消失,
    看来系统默认的配置是不能随便改的。



  • 今天遇到同样的问题...留个脚印
    如果之前没安装过delivery模块,删除重量基本单位后,再安装delivery模块会报同样的错误。

    报错的原因在这里 openerp\addons\delivery\stock.py

    class stock_move(osv.osv):<br />...<br />&nbsp; &nbsp; def _get_default_uom(self,cr,uid,c):<br />&nbsp; &nbsp; &nbsp; &nbsp; uom_categ, uom_categ_id = self.pool.get(&#039;ir.model.data&#039;).get_object_reference(cr, uid, &#039;product&#039;, &#039;product_uom_categ_kgm&#039;)<br />&nbsp; &nbsp; &nbsp; &nbsp; return self.pool.get(&#039;product.uom&#039;).search(cr, uid, [(&#039;category_id&#039;, &#039;=&#039;, uom_categ_id),(&#039;factor&#039;,&#039;=&#039;,1)])[0]<br />&nbsp; &nbsp; 
    



    不知道这算不算安装上的一个bug
    最好是不管系统原来有没有,安装delivery时,强制写入一条record,再次声明重量的默认单位


    另外,自认为简单的解决办法(可能会覆盖一些你做过的修改):
    将 addons\product\product_data.xml 中的
    <data noupdate="1"> 改为
    <data noupdate="0">
    升级product模块,再安装delivery。