Odoo Help

Welcome!

This community 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.

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 2,731 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

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
3577
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 6/19/14, 5:21 AM

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

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
3883
| 5 3 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 6/20/14, 1:05 AM

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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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