Skip to Content
Menu
This question has been flagged
1 Reply
1312 Views

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. 

Avatar
Discard
Best Answer

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.

Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
1010
1
Jan 21
2369
6
Nov 19
14604
1
Mar 17
3999
0
Feb 17
3069