This question has been flagged
2 Replies
3203 Views

Hi everybody,

I'm trying to do the field "opt_out" invisible in partner.form but can't find the correct xml syntax.

Maybe someone could help me ?

Thanks in advance.

JMB

Avatar
Discard

i think you should use the attrs tag invisible attribute.

Author Best Answer

Here is the correct syntax :

<record model="ir.ui.view" id="res_partner_opt_out_form">
            <field name="name">res.partner.opt.out.form</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="email_template.res_partner_opt_out_form"/>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <field name="opt_out" position="replace">
                    <field name="opt_out" invisible="1"/>
                </field>
                </field>                
        </record>

Hope it will be usefull

Avatar
Discard
Best Answer

Hello,

In the email_template module go to the file res_partner_view.xml.

write the following line:

<field name="opt_out" invisible="1"/>

Instead of below line :

<field name="opt_out"/>

Thanks,
www.acespritech.com

Avatar
Discard
Author

Thanks for your answer. But I would like do that with inherit process. I don't understand because the field is inside the module "base" but when I call it in my xlm file it appear an error...