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.

1

dynamic placeholder name change

By
Vincent Myo
on 2/10/15, 6:34 AM 540 views

i would like to chage the placeholder name when click something....let me show you.

First :

<field name="name" default_focus="1" placeholder="Name" />

then i change  like the following.

<xpath expr="//form/sheet/div/h1/field[@name='name']" position="attributes">
                    <attribute name="placeholder" attrs="{'invisible': ['&amp;', ('is_company', '=', False), ('supplier', '=', False)]}">[Something]</attribute>
                </xpath>

 

At that time, i like to click the company's checkbox, change the original one.

<field name="name" default_focus="1" placeholder="Name" />

 

 

what am i doing like the above case?

 

I don't have enough insight to answer how you can implement dynamic placeholder as you have states, but the <attribute tag can only contain "name" attribute and nothing else (cannot contain "attrs")

Ivan
on 2/11/15, 5:01 AM

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

2 follower(s)

Stats

Asked: 2/10/15, 6:34 AM
Seen: 540 times
Last updated: 3/16/15, 8:10 AM