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

由于系统升迁的原因,本论坛部分较早期的内容存在格式和链接损坏失效的问题,并非本论坛系统本身的缺陷,望谅解

本社区没有维护任何QQ群讨论组,任何与本社区同名的QQ群讨论组的言论与本社区无关!

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

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

继承wizard并传递数据



  • odoo8中sale.order通过按钮创建invoice,代码是通过wizard传递数据的。

    现在想要多传递一个值,sale.order中记录了invoice_ids,(但invoice中没有记录sale.order的信息)现在要把sale.order的一个char值给传递给invoice

    尝试:
    继承wizard,在传值的方法中添加一个值传递,但是报错如下:

    Traceback (most recent call last):
      File "/home/hui/.local/lib/python2.7/site-packages/werkzeug/serving.py", line 193, in run_wsgi
        execute(self.server.app)
      File "/home/hui/.local/lib/python2.7/site-packages/werkzeug/serving.py", line 181, in execute
        application_iter = app(environ, start_response)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/service/server.py", line 294, in app
        return self.app(e, s)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/service/wsgi_server.py", line 216, in application
        return application_unproxied(environ, start_response)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/service/wsgi_server.py", line 202, in application_unproxied
        result = handler(environ, start_response)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/http.py", line 1299, in __call__
        return self.dispatch(environ, start_response)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/http.py", line 1273, in __call__
        return self.app(environ, start_wrapped)
      File "/home/hui/.local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__
        return self.app(environ, start_response)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/http.py", line 1444, in dispatch
        ir_http = request.registry['ir.http']
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/http.py", line 355, in registry
        return openerp.modules.registry.RegistryManager.get(self.db) if self.db else None
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/registry.py", line 339, in get
        update_module)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/registry.py", line 370, in new
        openerp.modules.load_modules(registry._db, force_demo, status, update_module)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/loading.py", line 351, in load_modules
        force, status, report, loaded_modules, update_module)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/loading.py", line 255, in load_marked_modules
        loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/loading.py", line 152, in load_module_graph
        models = registry.load(cr, package)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/registry.py", line 163, in load
        model = cls._build_model(self, cr)
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/models.py", line 595, in _build_model
        original_module = pool[name]._original_module if name in parents else cls._module
      File "/home/hui/odoo-dev/odoo8/odoo/openerp/modules/registry.py", line 102, in __getitem__
        return self.models[model_name]
    KeyError: 'sale.order.line.make.invoice'
    

Log in to reply