Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4351 Представления

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")
Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 24
1145
1
июн. 21
2876
1
апр. 21
1968
0
дек. 19
5381
1
нояб. 19
4032