Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
385 Zobrazení

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
Zrušit
Autor

Hello everyone, 

thank you the example works.

Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 25
422
2
úno 25
2487
0
bře 15
3762
3
srp 25
513
1
srp 25
243