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

Is there a way to make the tags field required when creating a new opportunity in the CRM ?

形象
丢弃
最佳答案

A "work around" to solve this without studio or additional modules could be creating an Automated Action to pop up a warning when creating new opportunities:



code:

if record.stage_id.name == 'New' and not record.tag_ids:
    raise UserError('Please set a tag for this opportunity.')

形象
丢弃
最佳答案

You can use attrs to make it readonly on Opportunity state.

attrs="{'required': [('type','=','opportunity')]}"

形象
丢弃
编写者

already did that I want to get an invalid value error when the tags field is empty

相关帖文 回复 查看 活动
1
4月 23
2048
5
9月 25
22202
3
8月 25
3252
1
5月 25
3102
1
4月 25
4073