Odoo Help

0

How to change the label name of description field from account.invoice.refund model wizard

By
Odoo
on 6/19/14, 3:44 AM 3,722 views

Hi,

I want to change the label name of description to ID in account.invoice.refund wizard not the field so  want to use the same char type via xpath .How it is possible .need help............

 

<record id="magento_refund_wizard_form" model="ir.ui.view">
            <field name="name">magento.refund.wizard.form</field>
            <field name="model">account.invoice.refund</field>
            <field name="inherit_id" ref="account.view_account_invoice_refund"/>
            <field name="arch" type="xml">
             <xpath expr="/form/group/group[1]/div/field[@name='filter_refund']" position="after">
                     <group>
                         
                     <field name="amount"/>
                        <field name="stock_anyitem"/>
                <field name="refund_reason"/>
                     
                         </group>
        </xpath>
        
        <xpath expr="/form/group/group[2]/field[1][@name='description']" position="replace">
           <label for="description" string="ID"/>


           </xpath>

 

# Here i  want to change only the label name of description field  to ID not the char type . current xpath is not working because it replaces to ID but the char type area is vanish .So How to write the xpath

<xpath expr="/form/group/group[2]/field[1][@name='description']" position="replace"> <field name="description" string="ID"/> </xpath>

Odoo
on 6/20/14, 12:51 AM

<xpath expr="/form/group/group[2]/field[1][@name='description']" position="replace"> <field name="description" string="ID"/> </xpath>

Odoo
on 6/24/14, 8:25 AM
4

Hi, try this...

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

<label for="description" position="replace">
                    <label string="ID" for="description"  />
</label>

</field>

Hi Dhinesh , error occurs in xml,i already tried that one use xpath like-------- <xpath expr="/form/group/group[2]/field[1][@name='description']" position="replace">

Odoo
on 6/19/14, 5:47 AM
0

Try this,

<xpath expr="//field[@name='description']" position="attributes">
          <attribute name="string">ID</attribute>
</xpath>

This changes the label value of field "description" to ID.

0
Vũ Quốc Hoàng
On 6/20/14, 2:19 AM

Actually you don't need 

    <xpath expr="/form/group/group[2]/field[1][@name='description']" position="replace">
           <label for="description" string="ID"/>

you just need

<label for="description" position="replace">
                    <label for="description"  string="ID"/>
                </label>

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 6/19/14, 3:44 AM
Seen: 3722 times
Last updated: 3/16/15, 8:10 AM