[FIX] mass_mailing: fix mass mailing creation in non debug mode

Purpose: make `name` a non-required field in form view

Currently `name` field in the mass mailing is visible only in the debug
mode, and is set via create method based on `subject`. If user tries to
create a new mass mailing object in non debug mode, it gives a warning.

This commit fixes the behavior by setting `name` field as non-required
in the form-view and thus avoiding the warning when field is not visible.
It will not cause issue since the `name` field is coming from the model
`utm.source` and is already a required through field definition.

Task 2178214
PR #43709

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Dharmraj Jhala
2020-01-27 10:09:24 +00:00
committed by Thibault Delavallée
parent 6f95973484
commit 9c19db3e35
@@ -196,7 +196,7 @@
<group>
<group>
<field name="id" invisible="1"/>
<field name="name" attrs="{'required': [('id', '!=', False)]}" groups="base.group_no_one" string="Name"/>
<field name="name" required="False" groups="base.group_no_one" string="Name"/>
<field name="user_id"/>
<field name="email_from" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/>
<label for="reply_to"/>