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

OptionalProductsModal have this function willstart , i need to add some things to it
when i use include and call the function it also calls the base function willstart , but i want it to only call my function written in custom file , But also want super statement because the parent super of original method needs to be called (for Dialog and mixins )

Any workaround to only bypass one level of super ???? or to override the whole thing !!


Ảnh đại diện
Huỷ bỏ
Tác giả

Any Ideas on this ??

Câu trả lời hay nhất

Hi,

Try like below code

/** @odoo-module */

import { OptionalProductsModal } from "@sale_product_configurator/js/product_configurator_modal";

OptionalProductsModal.prototype.willStart = function (){
// Your code
return this._super.apply(this, arguments)
}

Regards

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 23
2980
Override JS mail Đã xử lý
3
thg 7 21
5299
1
thg 8 19
3033
2
thg 5 19
5586
2
thg 4 19
3460