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

I would like to link to the contact record in my validation error. The message is 

f"Partners: {names} are not configured properly. (etc.)"

Where names is a list of contacts. I would like these names to link to their corresponding contact record. How can I make them links instead of strings?  


頭像
捨棄
最佳答案

Hi,

You can try as follows:

raise ValidationError(_("Invalid field %s.%s") % (model_name, field_name))


Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
10月 24
1104
0
9月 23
1784
7
5月 18
4073
3
4月 16
6438
1
4月 24
2179