Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
213 Vistas

Estoy programando un modulo en el POS de odoo 18 

me salio el siguiente error 

point_of_sale.assets_prod.min.js:24 The following modules are needed by other modules but have not been defined, they may not be present in the correct asset bundle:

  1. Array(1)
    1. 0: "@point_of_sale/app/store/models"
    2. length: 1
    3. [[Prototype]]: Array(0)



es te es el import que me esta dando lata 

import { Order } from "@point_of_sale/app/store/models";   me pueden ayudar a saber la ruta exacta, gracias

Avatar
Descartar
Mejor respuesta

Hi,

The error happens because your code was trying to import Order from the wrong path (@point_of_sale/app/store/models), which doesn’t exist in Odoo 18. The correct module path is @point_of_sale/app/models/pos_order. So you should update your import to:

import { PosOrder } from "@point_of_sale/app/models/pos_order";

After fixing the import, ensure your module’s JavaScript is properly declared in __manifest__.py under the point_of_sale._assets_pos bundle so it loads after POS core modules. You can also confirm the correct module name by opening the source file and checking the /** @odoo-module **/ declaration.


Hope it helps

Avatar
Descartar
Autor

thank you i appreciate your answer

Autor Mejor respuesta
import { PosOrder } from "@point_of_sale/app/models/pos_order";  esa es la ruta para extender el modelo, gracias... de hecho desde ayer lo encontre... pero no queria dejar abierto este post...

Avatar
Descartar