我在Windows和Ubuntu上使用python3运行odoo11(Community Edition)。我从github获得了源代码。使用python2运行odoo11时出错。我在requirements.txt
安装了所有软件包。我该如何解决错误?
2017-12-15 06:16:32,072 4048 INFO odoo11 odoo.addons.base.ir.ir_ui_view: Field 'False' used in attributes must be present in view but is missing:
- 'False' in domain="['|', ('active', '=', False), ('active', '=', True)]"
Field 'True' used in attributes must be present in view but is missing:
- 'True' in domain="['|', ('active', '=', False), ('active', '=', True)]"
Error context:
View `ir.cron search`
[view_id: 25, xml_id: n/a, model: ir.cron, parent_id: n/a]
2017-12-15 06:16:32,085 4048 WARNING odoo11_python2 odoo.modules.loading: Transient module states were reset
2017-12-15 06:16:32,086 4048 ERROR odoo11_python2 odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "E:\develop\source\odoo11\odoo\modules\registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "E:\develop\source\odoo11\odoo\modules\loading.py", line 284, in load_modules
loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=update_module, report=report)
File "E:\develop\source\odoo11\odoo\modules\loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "E:\develop\source\odoo11\odoo\modules\loading.py", line 94, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "E:\develop\source\odoo11\odoo\tools\convert.py", line 788, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "E:\develop\source\odoo11\odoo\tools\convert.py", line 849, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "E:\develop\source\odoo11\odoo\tools\convert.py", line 748, in parse
exc_info[2]
File "E:\develop\source\odoo11\odoo\tools\convert.py", line 741, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "E:\develop\source\odoo11\odoo\tools\convert.py", line 651, in _tag_record
id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
File "E:\develop\source\odoo11\odoo\addons\base\ir\ir_model.py", line 1467, in _update
record = record.create(values)
File "E:\develop\source\odoo11\odoo\addons\base\ir\ir_ui_view.py", line 401, in create
return super(View, self).create(self._compute_defaults(values))
File "E:\develop\source\odoo11\odoo\models.py", line 3286, in create
self._fields[key].determine_inverse(record)
File "E:\develop\source\odoo11\odoo\fields.py", line 1078, in determine_inverse
getattr(records, self.inverse)()
File "E:\develop\source\odoo11\odoo\addons\base\ir\ir_ui_view.py", line 269, in _inverse_arch
view.write(data)
File "E:\develop\source\odoo11\odoo\addons\base\ir\ir_ui_view.py", line 417, in write
return super(View, self).write(self._compute_defaults(vals))
File "E:\develop\source\odoo11\odoo\models.py", line 3008, in write
self._write(old_vals)
File "E:\develop\source\odoo11\odoo\models.py", line 3161, in _write
self._validate_fields(vals)
File "E:\develop\source\odoo11\odoo\models.py", line 971, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
ParseError: "Error while validating constraint
Field 'False' used in attributes must be present in view but is missing:
- 'False' in domain="['|', ('active', '=', False), ('active', '=', True)]"
Field 'True' used in attributes must be present in view but is missing:
- 'True' in domain="['|', ('active', '=', False), ('active', '=', True)]"
答案 0 :(得分:0)
使用'true'而不是'True'
答案 1 :(得分:0)
您无法使用python 2.7运行ODOO 11。 ODOO 11仅支持python 3.5x