How would you change the attributes of an existing field?
I have set up a form view that inherits base.view_partner_form
I want to hide the 'is_company' field. I still need it to have a value, so can't just use position=replace to remove it. I tried adding in
<field name="is_company" invisible="1"/> but unsurprisingly it didn't work. how are you meant to do this?
The correct code is:
<field name="is_company" position="replace"> <field name="is_company" invisible="1"/> </field>
I want to remind you that field attributes can also be changed like this:
<field name="is_company" position="attributes"> <attribute name="invisible">True</attribute> </field>
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
|Asked: 4/2/13, 11:45 AM|
|Seen: 4115 times|
|Last updated: 3/16/15, 8:10 AM|