fix(configurator): wrap t-field widgets in <span> inside table cells
Some checks failed
fusion_accounting CI / test (fusion_accounting_ai) (push) Has been cancelled
fusion_accounting CI / test (fusion_accounting_core) (push) Has been cancelled
fusion_accounting CI / test (fusion_accounting_migration) (push) Has been cancelled

Acknowledgement PDF rendering failed with "QWeb widgets do not work
correctly on 'td' elements" — Odoo's qweb compiler rejects
t-field/t-options directly on <td>. Wrap the monetary / qty widgets
in an inner <span> for every cell that uses them (body rows + footer
total).

Caught during browser UAT on S00066 — shell _render_qweb_pdf smoke
test passed earlier because it bypasses the full compile path, but
the production /report/pdf/ endpoint fails the assertion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-19 23:59:02 -04:00
parent 1817f63c67
commit d36933d7f4

View File

@@ -96,15 +96,20 @@
<br/> <br/>
<small t-field="line.name"/> <small t-field="line.name"/>
</td> </td>
<td t-field="line.x_fc_coating_config_id"/> <td>
<td class="text-end" <span t-field="line.x_fc_coating_config_id"/>
t-field="line.product_uom_qty"/> </td>
<td class="text-end" <td class="text-end">
t-field="line.price_unit" <span t-field="line.product_uom_qty"/>
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/> </td>
<td class="text-end" <td class="text-end">
t-field="line.price_subtotal" <span t-field="line.price_unit"
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/> t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
</td>
<td class="text-end">
<span t-field="line.price_subtotal"
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
</td>
</tr> </tr>
</tbody> </tbody>
<tfoot> <tfoot>
@@ -113,8 +118,10 @@
<strong>Total</strong> <strong>Total</strong>
</td> </td>
<td class="text-end"> <td class="text-end">
<strong t-field="doc.amount_total" <strong>
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/> <span t-field="doc.amount_total"
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
</strong>
</td> </td>
</tr> </tr>
</tfoot> </tfoot>