如何更新合作伙伴/公司的external_id以及默认的external_id在odoo中生成的位置?

时间:2017-12-11 13:00:06

标签: openerp odoo-8 odoo-9 odoo-10 openerp-8

我想在使用create()方法创建合作伙伴时更新系统中res.partner的所有外部ID。此外,我没有获得默认外部标识名称(res_partner_id)生成的功能。

示例:

默认生成的external_id:res_partner_ [id]

要更新的外部ID:abcd_res_partner_country_id_ [id]

1 个答案:

答案 0 :(得分:0)

*ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code for hash sha224 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha224 ERROR:root:code for hash sha256 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructoremphasized text raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha256 ERROR:root:code for hash sha384 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha384 ERROR:root:code for hash sha512 was not found. Traceback (most recent call last): File "/usr/local/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha512 Traceback (most recent call last): File "/var/www/QuantEngine/prod/QuantScripts/QuantEngineCli.py", line 11, in <module> from services import DataStructureManager, DatabaseFsHelper, Orchestra, BacktestManager File "/var/www/QuantEngine/prod/QuantScripts/services/__init__.py", line 8, in <module> from BuySellManager import BuySellManager File "/var/www/QuantEngine/prod/QuantScripts/services/BuySellManager.py", line 1, in <module> import requests File "/var/www/QuantEngine/venv/lib/python2.7/site- packages/requests/__init__.py", line 43, in <module> import urllib3 File "/var/www/QuantEngine/venv/lib/python2.7/site- packages/urllib3/__init__.py", line 8, in <module> from .connectionpool import ( File "/var/www/QuantEngine/venv/lib/python2.7/site- packages/urllib3/connectionpool.py", line 29, in <module> from .connection import ( File "/var/www/QuantEngine/venv/lib/python2.7/site-packages/urllib3/connection.py", line 39, in <module> from .util.ssl_ import ( File "/var/www/QuantEngine/venv/lib/python2.7/site- packages/urllib3/util/__init__.py", line 6, in <module> from .ssl_ import ( File "/var/www/QuantEngine/venv/lib/python2.7/site- packages/urllib3/util/ssl_.py", line 7, in <module> from hashlib import md5, sha1, sha256 ImportError: cannot import name md5* 是数据记录的标识符。这背后的机制非常简单:Odoo保留一个表,其中包含名为External ID和相应数字数据库ID之间的映射。这是External IDs模型。

要检查现有映射,请转到“设置”菜单的“技术”部分,然后选择“序列”和“序列”。标识符|外部标识符菜单项。

推荐链接:https://www.odoo.com/forum/help-1/question/how-to-update-external-id-50395