[英]Change title of automatically generated form view in Odoo
The name in the form view is gotten in two ways表单视图中的名称有两种获取方式
name
of the field (ie name = fields.Char('Field name')
)name
的字段(即name = fields.Char('Field name')
)_rec_name
to some other field or you override _name_get
to set a custom name_rec_name
设置为其他字段或覆盖_name_get
以设置自定义名称时so what you can simply do is set所以你可以简单地做的是设置
_rec_name
to another field in your model _rec_name
到模型中的另一个字段
That's the name that will show up the form heading or in the drop down field of any other model where you have a relation to it.该名称将显示在表单标题或与您有关系的任何其他模型的下拉字段中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.