Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何将odoo8字段转换为odoo11_Python_Odoo 10_Odoo 11 - Fatal编程技术网

Python 如何将odoo8字段转换为odoo11

Python 如何将odoo8字段转换为odoo11,python,odoo-10,odoo-11,Python,Odoo 10,Odoo 11,如何将odoo8字段转换并迁移到odoo11 请给我答案 python代码odoo8: _columns = { 'name' : fields.char('Name', 64, required=True), 'code' : fields.char('Code', 9, required=True), 'description' : fields.text('Description'), 'active': fields.boo

如何将odoo8字段转换并迁移到odoo11

请给我答案

python代码odoo8:

_columns = {
        'name' : fields.char('Name', 64, required=True),
        'code' : fields.char('Code', 9, required=True),
        'description' : fields.text('Description'),
        'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the record without removing it."),
    }

不再使用
\u列
,字段类型现在以大写字母开始

name = fields.Char(
    string='Name',
    size=64,
    required=True,
)
code = fields.Char(
    string='Code',
    size=9,
    required=True
)
description = fields.Text(
    string='Description',
)
active = fields.Boolean(
    string='Active',
    help='If the active field is set to False, it will allow you to hide the '
         'record without removing it.'
)

我想将ODOO8所有字段转换为odoo10。任何脚本代码只需使用代码的替换功能即可editor@Sankar上师,人们通过这种迁移工作赚钱,我想没有人会免费帮你。我以为你是想自己做的。如果最后你自己做的话,在脚本中使用正则表达式。@forvas,我会试试。非常感谢。