Skip to Content
Menu
This question has been flagged
1754 Views

Hello there,

   I need to change the attribute in a field in a report based on a condition. to clarify, I'm inheriting a report and I need to change the attribute in the field where I call the custom header.


See code (incomplete but enough):

<template id="report_saleorder_document">

<t t-call="report.external_layout">

<div class="page">


the following code  I made doesn't work:

<template id="report_saleorder_document" inherit_id="sale.report_saleorder_document">

<xpath expr=".//t[@t-call='report.external_layout']" position="attributes">

<attribute t-if="corso_id" name="t-call">na_aurema_hr.corsi_external_layout</attribute> 

</xpath>


Can someone help me with the if clause in the attribute?


Thanks

Avatar
Discard