Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
379 Tampilan

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
Buang
Penulis

Hello everyone, 

thank you the example works.

Jawaban Terbai

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jun 25
420
2
Feb 25
2470
0
Mar 15
3759
3
Agu 25
511
1
Agu 25
213