跳至内容
菜单
此问题已终结
1 回复
2051 查看

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
1390
0
9月 23
2005
7
5月 18
4267
3
4月 16
6668
1
7月 25
1173