İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
416 Görünümler

How can i change the description of the field? I use odoo 18 and with this example it does not work. The label remains the same.

<record id="view_purchase_order_form" model="ir.ui.view">

​<field name="name">purchase.order.form</field>

          <field name="model">purchase.order</field>

          <field name="inherit_id" ref="purchase.purchase_order_form"/>

          <field name="arch" type="xml">

                 <xpath expr="//field[@name='order_line']/form//field[@name='product_uom']" position="attributes">

                    <attribute name="string">Mengeneinheit</attribute>

                </xpath>                   

            </field>

</record>

Avatar
Vazgeç
Üretici

Hello everyone, 

thank you the example works.

En İyi Yanıt

Hello,

Your code will change it in order_line form view but if you want to change it for list view use the below:

I used [@name='product_uom'][2] because there are two fields with name product_uom

<record id="view_purchase_order_form" model="ir.ui.view">

​<field name="name">purchase.order.form</field>

          <field name="model">purchase.order</field> ​ ​

          <field name="inherit_id" ref="purchase.purchase_order_form"/>

          <field name="arch" type="xml">

                 <xpath expr="//field[@name='order_line']//list//field[@name='product_uom'][2]" position="attributes">

                    <attribute name="string">Mengeneinheit</attribute>

                </xpath>                   

            </field>

</record>

Result will look like:

Avatar
Vazgeç
En İyi Yanıt

Hi,


Try with the following code.

<xpath expr="//field[@name='order_line']//list//field[@name='product_uom'][2]" position="attributes">
<attribute name="string">Mengeneinheit</attribute>
</xpath>

Hope it helps

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 25
434
2
Şub 25
2549
0
Mar 15
3788
1
Ağu 25
295
3
Ağu 25
538