gpt4 book ai didi

python - 如何将 odoo8 字段转换为 odoo11

转载 作者:行者123 更新时间:2023-12-01 01:53:12 24 4
gpt4 key购买 nike

如何将 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."),
}

最佳答案

不再使用_columns,字段类型现在以大写字母开头。

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.'
)

关于python - 如何将 odoo8 字段转换为 odoo11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50522619/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com