I have the following problem.
when I use the define , I have the error " core not defined" and all the dependencies too.
I add [] because , i have error " Dependencies should be defined by an array: function(require)"
Example:
odoo.define('pos_button.Custom', [], function (require) {
"use strict";
var core = require('web.Core');
i try
odoo.define('pos_button.Custom',[], function(require) {
'use strict';
const { Gui } = require('point_of_sale.Gui');
const PosComponent = require('point_of_sale.PosComponent');
const { identifyError } = require('point_of_sale.utils');
const ProductScreen = require('point_of_sale.ProductScreen');
const { useListener } = require("@web/core/utils/hooks");
const Registries = require('point_of_sale.Registries');
const PaymentScreen = require('point_of_sale.PaymentScreen');
console.log("Custom JavaScript In POS")
but i have error "TypeError: require(...) is undefined"
What am I doing wrong?
Thanks for help.