Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2536 Lượt xem

Please could someone help me figure out the problem with the appended code in the Inherited View failing to make existing field phone Mandatory in the base model crm.lead :


True


Ảnh đại diện
Huỷ bỏ
Tác giả

Hi,


I tried this method , but it did not work without giving any error.


Please suggest further. 


Regards,

please try providing more info like which model, view etc, normally this code has to work.

you can check below points.
* does the field is rewritten from any other place
* is the inherited view get added in the db etc

Tác giả

I tried to make the fields partner_id , partner_name of the CRM.LEAD module REQUIRED using a inherited view - No error is shown , however, I could save an existing lead without any Partner Id or Partner Name. The Same holds true for Phone , Mobile and other existing fields in the crm.lead module as well.


Please could you suggest.

can you confirm that the inherited view get added in your db,

Tác giả

Yes, the inherited View is added to the base model crm.lead. which is evident from editing the view form in the developer mode.

Please suggest.

Câu trả lời hay nhất

Hi,

You can inherit the corresponding view and set required property as True for the field.


xpath expr="field[@name='city']" position="attributes"
attribute name="required">1attribute>
/xpath



Thanks

Ảnh đại diện
Huỷ bỏ

<xpath expr="field[@name='city']" position="attributes">
<attribute name="required">1</attribute>
</xpath>

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 23
2384
0
thg 7 23
2193
0
thg 7 23
1993
0
thg 1 21
3094
1
thg 7 19
5332