refactor: update xpath expressions to use hasclass helper for Odoo template inheritance
This commit is contained in:
parent
b7b882fb41
commit
6664c260f0
@ -2,7 +2,7 @@
|
||||
<templates id="template" xml:space="preserve">
|
||||
<!-- Add Reprint Kitchen Button to Synced Orders (Right Pane underneath details) -->
|
||||
<t t-name="pos_kitchen_printer.TicketScreen" t-inherit="point_of_sale.TicketScreen" t-inherit-mode="extension">
|
||||
<xpath expr="//button[contains(@class, 'edit-order-payment')]" position="after">
|
||||
<xpath expr="//button[hasclass('edit-order-payment')]" position="after">
|
||||
<button t-if="this.pos.unwatched.printers.length"
|
||||
class="control-button btn btn-secondary btn-lg lh-lg flex-grow-1 flex-shrink-1"
|
||||
t-on-click="() => this.onClickReprintAll(_selectedSyncedOrder)">
|
||||
@ -11,7 +11,7 @@
|
||||
</xpath>
|
||||
|
||||
<!-- Enhance the existing cutlery button for unsynced orders -->
|
||||
<xpath expr="//button[contains(@t-on-click, 'onClickReprintAll') and contains(@class, 'd-flex')]" position="replace">
|
||||
<xpath expr="//button[contains(@t-on-click, 'onClickReprintAll') and hasclass('d-flex')]" position="replace">
|
||||
<button class="button btn btn-secondary btn-lg d-flex flex-row align-items-center justify-content-center flex-grow-1"
|
||||
t-on-click="() => this.onClickReprintAll(_selectedSyncedOrder)"
|
||||
t-if="this.pos.unwatched.printers.length and _selectedSyncedOrder.uiState.lastPrints.length">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user