[FIX] mail: the subject field is not correctly aligned

The field was not correctly aligned because the invisible rule was not
the same on the field and the sibling's DIV. So in some case, we can
have an empty DIV present with no label (e.g. when `is_log = false` and
`composition_mode = mass_mail`).

Note that now with grid, we need two filled columns otherwise we will
have a shift for the next following labels/fields, because grid will try
to fill the empty space.

Steps to reproduce:
* Open Helpdesk
* Select a Team
* Select the list view
* Check a row (line)
* Click on "Action" menu
* Click on "Send Email" => BUG

closes odoo/odoo#102941

X-original-commit: 52c8a8f4c16fe5765d64265f718164162f1cf172
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Romeo Fragomeli
2022-10-10 18:09:06 +02:00
parent fa9e74574d
commit 1f4be12781
@@ -25,11 +25,10 @@
<field name="email_from"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<label for="partner_ids" string="Recipients" attrs="{'invisible': ['|', ('is_log', '=', True), ('composition_mode', '!=', 'comment')]}"/>
<div groups="base.group_user" attrs="{'invisible': [('is_log', '=', True)]}">
<div groups="base.group_user" attrs="{'invisible': ['|', ('is_log', '=', True), ('composition_mode', '!=', 'comment')]}">
<span name="document_followers_text" attrs="{'invisible':['|', ('model', '=', False), ('composition_mode', '=', 'mass_mail')]}">Followers of the document and</span>
<field name="partner_ids" widget="many2many_tags_email" placeholder="Add contacts to notify..."
context="{'force_email':True, 'show_email':True}"
attrs="{'invisible': [('composition_mode', '!=', 'comment')]}"/>
context="{'force_email':True, 'show_email':True}"/>
</div>
<field name="subject" placeholder="Welcome to MyCompany!" required="True"/>
<!-- mass post -->