upgrade-t-call-body (U2004)#

t-set inside a t-call, no longer passed to the template in Odoo 20.0.

Applies to Odoo 20.0 and later.

What it does#

Reports t-call elements whose body sets values with t-set.

Why is this bad?#

Since Odoo 19.0 a t-call takes its parameters as attributes (<t t-call="x" title="record.name"/>); 20.0 no longer passes the t-sets of the body, without an error: the called template renders without them.

Fix safety#

Safe when the body is only <t t-set="a" t-value="..."/> elements: they become attributes of the t-call, as Odoo’s script 19.1-00-t-call does. A t-set with a body, other content, or an xpath on the call needs a person.