Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1362 Widoki

Odoo 17 had alot of change in implementataion of inheritace of JS i have no idea how to inherit js in this action_pad template

<templates id="template" xml:space="preserve">

<t t-name="point_of_sale.ActionpadWidget">

<div class="actionpad d-flex flex-column flex-grow-1 mw-50 p-0 border-end">

<button class="pay validation pay-order-button btn-primary"

                t-attf-class="{{getMainButtonClasses()}}"

                t-att-class="{ 'with-more-button': props.onClickMore and ui.isSmall }"

                t-on-click="props.actionToTrigger ? this.props.actionToTrigger : () => pos.get_order().pay()">

                <div class="pay-circle d-flex align-items-center justify-content-center py-2 mb-2">

                    <i class="oi oi-chevron-right" role="img" aria-label="Pay" title="Pay" />

                </div>

                <t class="text-white" t-esc="props.actionName" />

            </button>

</div>

</t>

</template>

i want to add popup message when i press Payment button in POS. 

Awatar
Odrzuć
Najlepsza odpowiedź

Hello, If you want to add pop up you can use popup service.

Example code:
this.popup.add(ErrorPopup, {

title: _t('Popup Title'),

body: _t('Popup Message Body'),

});

If you want to trigger the popup code maybe you could extend the onClick function to trigger the popup service.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
gru 24
1044
1
sty 21
2417
6
lis 19
14669
1
mar 17
4064
0
lut 17
3105