Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2075 Vizualizări

Hello everyone,

I'm currently working on a module aimed at modifying the visibility of specific elements within the close POS popup for Odoo v16. My strategy involves creating a user group that can access these elements. As part of this, I need to incorporate this information into the getClosePosInfo() function within the PosGlobalState class when the popup is rendered.

Here's a snippet of my JavaScript file:


var models = require('point_of_sale.models');
var PosModel = models.PosModel;
var CustomPosGlobalState = PosModel.include({
});



However, upon starting the POS session, I encounter the following error:


PosModel is undefined TypeError: PosModel is undefined


I'm seeking guidance on understanding what might be causing this issue  and if there's an alternative approach you could recommend.

Imagine profil
Abandonează
Cel mai bun răspuns

The error "PosModel is undefined" likely means there's an issue with how PosModel is imported in your JavaScript code for Odoo v16. Have you tried the following?

  1. Make sure your module lists point_of_sale as a dependency in its manifest file.
  2. Verify that you're using the right syntax to import PosModel in Odoo v16.


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
nov. 23
38
2
dec. 17
3408
2
feb. 24
4549
2
aug. 23
4664
1
iul. 23
2260