コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4415 ビュー

I need to change the name of the "Product name" field to "Description" of the products template in odoo v13. I don't want to do that name change from the odoo interface, but from a custom addon. And if it is possible to change the characteristics of the existing field from the custom addon.

アバター
破棄
最善の回答

You can change the string attribute using a custom module you may use the below code for reference:


<xpath expr="//field[@name='reference_filed']" position="attributes">
    <attribute name="string">Your String Here</attribute>
</xpath>

. You may override the field as below:


class YourModel(models.Model):
    _inherit = 'your.model'

    reference_filed = fields.FieldType(string="Your String Here")
アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 24
1166
1
6月 21
2918
1
4月 21
1991
0
12月 19
5452
1
11月 19
4061