跳至內容
選單
此問題已被標幟
3 回覆
3147 瀏覽次數

Hi Everyone,

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


頭像
捨棄
最佳答案

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.


頭像
捨棄
最佳答案

Hi Vikas ,

You can achieve this using Odoo Studio as well.



Hope it helps,
Kiran K

頭像
捨棄
最佳答案

Hi Vikas,

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

Thanks.

頭像
捨棄
作者

can't we do it through XML?

作者

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

相關帖文 回覆 瀏覽次數 活動
2
8月 25
1370
2
8月 25
542
1
9月 24
1695
1
5月 24
1365
1
6月 22
3355