[FIX] mail: next activity due date type is required

Steps to reproduce:
-install base_automation and contacts
-go to settings > technical > automated actions
-create an automated action on new contact creation
-set your action to "create next activity"
-leave the activity due type to blank
-trigger the automated action by creating a new contact

Previous behavior:
you get a traceback error
"TypeError: __init__() keywords must be strings"

Current behavior:
the field is required when activity_date_deadline_range is not 0
and does not allow a blank type

opw-2159755

closes odoo/odoo#42503

X-original-commit: 04dff5ad6c5935f899c7946cb1924afaea9e547c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
jerome hanke (jhk)
2019-12-30 15:16:34 +00:00
parent 545e21da3c
commit a45c1b53cc
+3 -1
View File
@@ -18,7 +18,9 @@
<label for="activity_date_deadline_range"/>
<div class="o_row">
<field name="activity_date_deadline_range"/>
<field name="activity_date_deadline_range_type"/>
<field name="activity_date_deadline_range_type" attrs="{
'required': [('state', '=', 'next_activity'), ('activity_date_deadline_range', '>', 0)]
}"/>
</div>
<field name="activity_user_type"/>
<field name="activity_user_field_name" attrs="{