继承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'