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

Hi Odoo developers, 

This is sample manifest file. 

{
​ 'assets': {
        'point_of_sale._assets_pos': [
            'pos_square_app/static/*',
        ],
    }, 
}
import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";

When loading the POS UI, showing syntax error. The import statement on top of file is still there, which is not transpiled, that is the reason. 

Any ideas for the issue? 

Thanks

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

Still do not know the reason why attach js to bundle does not work. I have to use another way. 

odoo.define('@pos_square_app/payment_screen', [],
function(require) {
const { PaymentScreen } = require('@point_of_sale/app/screens payment_screen/payment_screen');
  });



Ảnh đại diện
Huỷ bỏ