Can somebody tell me if there is an overview of changes in POS between v16 and v17? I am quite new to v17 and Odoo development. When trying to port my v16 Module to v17 i get the error:
Uncaught Error: Error while loading "ew_l10n_at_pos_cert.pos":
TypeError: Cannot destructure property 'PosGlobalState' of 'require(...)' as it is undefined.
at ModuleLoader.startModule (module_loader.js:83:1)
at ModuleLoader.startModules (module_loader.js:70:1)
at ModuleLoader.addJob (module_loader.js:55:1)
at ModuleLoader.define (module_loader.js:45:1)
at pos.js:1:1
My code looks like this:
odoo.define('ew_l10n_at_pos_cert.pos', [], function (require) {
"use strict";
const { PosGlobalState, Order } = require('point_of_sale.models');
const { TaxError, NullReceiptProductError } = require('ew_l10n_at_pos_cert.errors');
const utils = require('web.utils');
const core = require('web.core');
const round_di = utils.round_decimals;
const Registries = require('point_of_sale.Registries');
// Importing the moment library for date manipulation
const moment = require('moment');
const L10nAtPosGlobalState = (PosGlobalState) => class L10nAtPosGlobalState extends PosGlobalState {
// Adding explanation for the constructor
constructor() {
super(...arguments);
// Mapping VAT rates to their corresponding types
this.vatRateMapping = {
20: 'NORMAL',
10: 'REDUCED_1',
13: 'REDUCED_2',
19: 'SPECIAL',
0: 'NULL'
};
}