Here is the code I have tried,
expr="//field[@name='email_from']" position="attributes">
name="invisible">1
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Here is the code I have tried,
expr="//field[@name='email_from']" position="attributes">
name="invisible">1
The email field can be shown in lead or opportunity, the below will hide it from both of them
<record id="crm_lead_view_form_inherit_hide_email" model="ir.ui.view">
<field name="name">crm.lead.view.form.inherit.hide.email</field>
<field name="model">crm.lead</field>
<field name="priority">15</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<!-- to hide email from opportunity !-->
<xpath expr="//group[@name='opportunity_partner']/label[@for='email_from']" position="attributes">
<attribute name="attrs">{'invisible': 1}</attribute>
</xpath>
<xpath expr="//group[@name='opportunity_partner']/div" position="attributes">
<attribute name="attrs">{'invisible': 1}</attribute>
</xpath>
<!-- to hide email from lead !-->
<xpath expr="//group[@name='lead_info']/label[@for='email_from_group_lead_info']" position="attributes">
<attribute name="attrs">{'invisible': 1}</attribute>
</xpath>
<xpath expr="//group[@name='lead_info']/div[2]" position="attributes">
<attribute name="attrs">{'invisible': 1}</attribute>
</xpath>
</field>
</record>
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Ol