Skip to Content
मेन्यू
This question has been flagged
2 Replies
395 Views

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
Discard
Author

Hello everyone, 

thank you the example works.

Best Answer

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
1
जून 25
427
2
फ़र॰ 25
2515
0
मार्च 15
3778
1
अग॰ 25
132
3
अग॰ 25
516