Skip to Content
Menú
This question has been flagged
2 Respostes
2063 Vistes

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

Avatar
Descartar
Best Answer

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.')

Avatar
Descartar
Best Answer

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

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

Avatar
Descartar
Autor

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

Related Posts Respostes Vistes Activitat
1
d’abr. 23
1842
1
de maig 25
2386
1
d’abr. 25
3422
1
d’abr. 25
4231
1
d’abr. 25
1732