Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1439 Lượt xem

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. 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 12 24
1115
1
thg 1 21
2480
6
thg 11 19
14762
1
thg 3 17
4171
0
thg 2 17
3191