OD327 chatter-div-replaced¶
A form's div with class oe_chatter no longer shows the chatter; use <chatter/>.
| Category | Severity | Series | Needs the index |
|---|---|---|---|
| Deprecation | Warning | saas~17.2 and later | no |
What it reports¶
A <div> whose class holds the token oe_chatter, which a view's arch adds. A spec that
locates the parent's chatter div, such as an xpath on hasclass('oe_chatter'), is not reported,
and neither is a QWeb view, which the server renders.
Why it matters¶
Up to saas~17.1 the form view compiles a <div class="oe_chatter"> into the chatter: the
messages, the activities and the followers of the record. From saas~17.2 it compiles only a
<chatter/> element, and renders the div as plain form markup, with the fields it holds as
ordinary fields. The form opens without error, so nothing says that the record lost its chatter:
users can no longer log a note, send a message or schedule an activity from it.
Modules of saas~17.1 and earlier are not checked, since <chatter/> does not exist there.
Example¶
<record id="view_project_milestone_form_tracked" model="ir.ui.view">
<field name="name">project.milestone.form.tracked</field>
<field name="model">project.milestone</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="name"/>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
The div holds the fields the chatter read before saas~17.2, which now show as plain fields.
<record id="view_project_milestone_form_tracked" model="ir.ui.view">
<field name="name">project.milestone.form.tracked</field>
<field name="model">project.milestone</field>
<field name="arch" type="xml">
<form>
<sheet>
<field name="name"/>
</sheet>
<chatter/>
</form>
</field>
</record>