feat: disable Bill button when order has unsent changes or is empty

This commit is contained in:
Suherdy Yacob 2026-06-08 20:54:37 +07:00
parent 59e9ea98a9
commit 6586daa494

View File

@ -9,5 +9,9 @@
<xpath expr="//button[contains(@t-on-click.stop, 'clickTransferCourse') or contains(@t-on-click, 'clickTransferCourse') or contains(., 'Transfer course')]" position="replace">
<!-- Hidden Transfer Course button -->
</xpath>
<!-- Disable Bill button if there are unsent changes -->
<xpath expr="//button[@t-on-click='clickPrintBill']" position="attributes">
<attribute name="t-att-disabled">!pos.getOrder()?.getOrderlines()?.length or pos.getOrderChanges().nbrOfChanges</attribute>
</xpath>
</t>
</templates>