0
我試着編寫一個Odoo 9模塊繼承其他模塊,當我嘗試安裝新的模塊,這個錯誤就出來了:開發Odoo 9自定義模塊時出錯?
Odoo服務器錯誤
Traceback (most recent call last):
File "/opt/odoo/openerp/http.py", line 648, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/openerp/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/openerp/http.py", line 321, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/openerp/service/model.py", line 118, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/openerp/http.py", line 314, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/openerp/http.py", line 964, in __call__
return self.method(*args, **kw)
File "/opt/odoo/openerp/http.py", line 514, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 892, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/odoo/addons/web/controllers/main.py", line 880, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/odoo/openerp/api.py", line 250, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/odoo/openerp/addons/base/module/wizard/base_module_upgrade.py", line 87, in upgrade_module
openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/odoo/openerp/modules/registry.py", line 386, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/openerp/modules/loading.py", line 338, in load_modules
loaded_modules, update_module)
File "/opt/odoo/openerp/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/odoo/openerp/modules/loading.py", line 123, in load_module_graph
load_openerp_module(package.name)
File "/opt/odoo/openerp/modules/module.py", line 331, in load_openerp_module
__import__('openerp.addons.' + module_name)
File "/opt/odoo/openerp/modules/module.py", line 61, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/odoo/addons/old_residual/__init__.py", line 3, in <module>
from . import models
File "/opt/odoo/addons/old_residual/models/__init__.py", line 3, in <module>
from . import old_residual
File "/opt/odoo/addons/old_residual/models/old_residual.py", line 14
for invoice in self:
^
IndentationError: expected an indented block**
請給我們自定義代碼old_residual.py。 – CZoellner
這是custom_module的代碼: –