Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
19547 Weergaven

I'm trying to customize the res.partner view in Odoo 8, what I want Is to be able to change the placeholder or the string of some fields that are shown on the form through attributes, but no luck so far.

I have this code:

<xpath expr="//field[@name='mobile']" position="attributes">

<attribute name="attrs">{'placeholder':"Cellphone Numer", 'required':True}</attribute>

</xpath>


The required works just fine and the field appears in blue, but no placeholder text.

Avatar
Annuleer
Beste antwoord

Carlos Rodriguez,

Here you go!

    <xpath expr="//field[@name='mobile']" position="attributes">

        <attribute name="placeholder">Cellphone Number</attribute>

        <attribute name="required">True</attribute>

    </xpath>

For updating each attribute information you have to define attribute tag.

Regards,

Anil.

Avatar
Annuleer
Auteur Beste antwoord

Anil Kesariya, thank you very much I managed to find out how to do it

<xpath expr="//field[@name='fax']" position="attributes">

      <attribute name="attrs">{'required':True, 'invisible':False}</attribute>

      <attribute name="string">Fax Number</attribute>

      <attribute name="placeholder">Please introduce fax number</attribute>

</xpath>


Works like a charm.

Regards,

Carlos.

Avatar
Annuleer

Thats great.

Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 22
2456
1
mei 22
3071
1
nov. 24
1087
5
jul. 24
91306
1
dec. 23
2645