Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持 Odoo 13 ? #8

Open
zengxinle opened this issue Jun 21, 2020 · 3 comments
Open

支持 Odoo 13 ? #8

zengxinle opened this issue Jun 21, 2020 · 3 comments

Comments

@zengxinle
Copy link

支持 Odoo 13 ?最近购买书籍学习中。

@zengxinle
Copy link
Author

zengxinle commented Jun 21, 2020

Odoo 13 更新应用后,“安装” 第六章的例子(bug管理 ),产生下列错误提示。
Odoo Server Error
Traceback (most recent call last):
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "C:\OdooDev\Odoo13\server\odoo\tools\pycompat.py", line 14, in reraise
raise value
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\OdooDev\Odoo13\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 915, in call
return self.method(*args, **kw)
File "C:\OdooDev\Odoo13\server\odoo\http.py", line 515, in response_wrap
response = f(*args, **kw)
File "C:\OdooDev\Odoo13\server\odoo\addons\web\controllers\main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "C:\OdooDev\Odoo13\server\odoo\addons\web\controllers\main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\OdooDev\Odoo13\server\odoo\api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "C:\OdooDev\Odoo13\server\odoo\api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "C:\OdooDev\Odoo13\server\odoo\addons\base\models\ir_module.py", line 72, in check_and_log
return method(self, *args, **kwargs)
File "C:\OdooDev\Odoo13\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:\OdooDev\Odoo13\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:\OdooDev\Odoo13\server\odoo\modules\registry.py", line 86, in new
odoo.modules.load_modules(registry.db, force_demo, status, update_module)
File "C:\OdooDev\Odoo13\server\odoo\modules\loading.py", line 423, in load_modules
loaded_modules, update_module, models_to_check)
File "C:\OdooDev\Odoo13\server\odoo\modules\loading.py", line 315, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "C:\OdooDev\Odoo13\server\odoo\modules\loading.py", line 182, in load_module_graph
load_openerp_module(package.name)
File "C:\OdooDev\Odoo13\server\odoo\modules\module.py", line 377, in load_openerp_module
import('odoo.addons.' + module_name)
File "C:\OdooDev\Odoo13\server\odoo\addons\bug-manage_init
.py", line 4, in
from . import models
File "C:\OdooDev\Odoo13\server\odoo\addons\bug-manage\models_init
.py", line 4, in
from . import bugs
File "C:\OdooDev\Odoo13\server\odoo\addons\bug-manage\models\bugs.py", line 5, in
class Bug(models.Model):
File "C:\OdooDev\Odoo13\server\odoo\addons\bug-manage\models\bugs.py", line 15, in Bug
@api.multi
AttributeError: module 'odoo.api' has no attribute 'multi'

@lzty634158
Copy link

改成如下:
@api.model_create_multi
def do_close(self):
for item in self:
item.is_closed = True
return True

@Yu425
Copy link

Yu425 commented Feb 21, 2022

支持odoo15?
我在学习第六章时安装BUG-管理模块时发生如下报错:

Traceback (most recent call last):
File "D:\odoo-15.0\odoo\addons\base\models\ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "D:\odoo-15.0\odoo\http.py", line 688, in dispatch
result = self._call_function(**self.params)
File "D:\odoo-15.0\odoo\http.py", line 360, in _call_function
return checked_call(self.db, *args, **kwargs)
File "D:\odoo-15.0\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "D:\odoo-15.0\odoo\http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "D:\odoo-15.0\odoo\http.py", line 917, in call
return self.method(*args, **kw)
File "D:\odoo-15.0\odoo\http.py", line 536, in response_wrap
response = f(*args, **kw)
File "d:\odoo-15.0\addons\web\controllers\main.py", line 1339, in call_button
action = self._call_kw(model, method, args, kwargs)
File "d:\odoo-15.0\addons\web\controllers\main.py", line 1327, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "D:\odoo-15.0\odoo\api.py", line 464, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "D:\odoo-15.0\odoo\api.py", line 451, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "D:\odoo-15.0\odoo\addons\base\models\ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "D:\odoo-15.0\odoo\addons\base\models\ir_module.py", line 483, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "D:\odoo-15.0\odoo\addons\base\models\ir_module.py", line 600, in _button_immediate_function
registry = modules.registry.Registry.new(self.cr.dbname, update_module=True)
File "D:\odoo-15.0\odoo\modules\registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "D:\odoo-15.0\odoo\modules\loading.py", line 474, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "D:\odoo-15.0\odoo\modules\loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "D:\odoo-15.0\odoo\modules\loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "D:\odoo-15.0\odoo\modules\loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "D:\odoo-15.0\odoo\tools\convert.py", line 745, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "D:\odoo-15.0\odoo\tools\convert.py", line 794, in convert_xml_import
relaxng.assert
(doc)
File "src\lxml\etree.pyx", line 3648, in lxml.etree.Validator.assert
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\odoo-15.0\odoo\http.py", line 644, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "D:\odoo-15.0\odoo\http.py", line 302, in _handle_exception
raise exception.with_traceback(None) from new_cause
AssertionError: Element odoo has extra content: data, line 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants