ruter / Odoo-Tutorial-Demo

Odoo 教程系列的配套源代码
https://ruterly.com/categories/#Odoo
GNU Affero General Public License v3.0
36 stars 36 forks source link

Odoo 13安装此todo app,报错 #5

Closed 1000copy closed 4 years ago

1000copy commented 4 years ago

Odoo 13安装此app,报错。错误消息如下: 操作系统: Windows 10 重现步骤:

  1. 拷贝https://github.com/ruter/Odoo-Tutorial-Demo内todo目录到addons目录。C:\Program Files (x86)\Odoo 13.0\server\odoo\addons
  2. 点击root | app菜单,然后点击update app list
  3. 在search内输入todo,并回车
  4. 发现todo app,点击安装。

    Error: Odoo Server Error

Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 624, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise raise value File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 669, in dispatch result = self._call_function(self.params) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 350, in _call_function return checked_call(self.db, *args, *kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 94, in wrapper return f(dbname, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 339, in checked_call result = self.endpoint(*a, kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 915, in call return self.method(*args, *kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 515, in response_wrap response = f(args, kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1326, in call_button action = self._call_kw(model, method, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1314, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 387, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 374, in _call_kw_multi result = method(recs, *args, *kwargs) File "", line 2, in button_immediate_install File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 72, in check_and_log return method(self, args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 463, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 573, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 423, in load_modules loaded_modules, update_module, models_to_check) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 315, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 182, in load_module_graph load_openerp_module(package.name) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\module.py", line 377, in load_openerp_module import('odoo.addons.' + module_name) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\todoapp__init.py", line 4, in from . import models File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\todoapp\models\init__.py", line 3, in from . import models File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\todoapp\models\models.py", line 6, in class TodoCategory(models.Model): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\todoapp\models\models.py", line 15, in TodoCategory @api.multi AttributeError: module 'odoo.api' has no attribute 'multi'

ruter commented 4 years ago

教程是基于 Odoo 11 开发的,13 中对很多特性做了变更,demo 在 13 版中需要修改才可以使用。