Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3 Risposte
3150 Visualizzazioni

Hi Everyone,

I want to make customer, email, phone fields not editable on Qualified Stage onwards.
how can I do this?


Avatar
Abbandona
Risposta migliore

Hi,

We can make fields readonly directly through the XML file itself.
To do this, inherit the form view 'crm.crm_lead_view_form' and set the 'readonly' attribute for the desired fields.

Refer to the below code:

    <xpath expr="//group[@name='opportunity_partner']/field[@name='partner_id']" position="attributes">
<attribute name="readonly">stage_id != %(crm.stage_lead1)d</attribute>
    </xpath>


Similarly, you can do it for the other 2 fields.

Hope it helps.


Avatar
Abbandona
Risposta migliore

Hi Vikas ,

You can achieve this using Odoo Studio as well.



Hope it helps,
Kiran K

Avatar
Abbandona
Risposta migliore

Hi Vikas,

Use is_stage_qualified field through condition in your crm view of specific field  readonly.

Thanks.

Avatar
Abbandona
Autore

can't we do it through XML?

Autore

will it ok
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="reaonly">stage_id == ['Qualified']</attribute>
</xpath>

Post correlati Risposte Visualizzazioni Attività
2
ago 25
1377
2
ago 25
550
1
set 24
1701
1
mag 24
1371
1
giu 22
3355