Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Problem closing my POS sessions in odoo 16

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
apiclosingbalanceclosingcontrolTPVodoov16
1593 Vistas
Avatar
David

Hello everyone, I need help from the forum.


I have created an import script from odoo 8 to odoo 16, and almost everything works correctly, but there is only one thing that does not work correctly, and that is when closing the POS sessions using the odoo 16 api. I have all the amounts of the orders and payments of these orders rounded and compared with the total to be able to record the same payment without decimal variations and that the totals of orders and payments are the same and this is true, but at the time of closing the session from the api with the "action_pos_session_closing_control" sometimes closes it but other times it does not close it, and I have to manually access odoo and close it, when I do this it shows me a message of "Force session closure" There is a difference between the amounts to be posted and order amounts, is probably due to taxes or changes to accounting settings. This difference is -0.01, which is impossible since I have reviewed all the totals and everything is perfect and not even 1 cent is missing. Is there a way to log out just like I do it manually in Odoo 16, to do it with the API? Still doing forced logout. I have tried all the methods included in the "pos_session.py" class of the odoo 16 core but it is impossible, the session is not closed. And if not, what happens is this due to an odoo 16 error? Since I have seen many people on the forum with this same problem.



I leave you part of my code that I use to close the sessions and that in some the method works and in others it does not, causing the problem of forcing the session to close.

models_target.execute_kw(db_target, uid_target, password_target,    
​​'pos.session', ​
​'action_pos_session_closing_control',
​​[[id_new_pos_session]]
)


This code is the one I try to use when the session does not close because it has an imbalance of -0.01 and it does not work, the session is still in closing control.

models_target.execute_kw(db_target, uid_target, password_target,
​'pos.session', ​
​'action_pos_session_closing_control',
​​[[id_new_pos_session]],
​​{'context': { ​ ​
​ ​'active_model': 'pos.session', ​ ​
​ ​'active_id': id_new_pos_session, ​ ​
​ ​'active_ids': [id_new_pos_session], ​
​ ​​'force_close': True, ​
​ ​​'cash_control': False,
​​}}
)

wizard_id = models_target.execute_kw(db_target, uid_target, password_target, ​
​'pos.close.session.wizard',
​​'create',
​​[{}]
)

models_target.execute_kw(db_target, uid_target, password_target, ​
​'pos.close.session.wizard',
​​'close_session',
​​[[(wizard_id)]],
​​{'context': { ​
​ ​​'active_model': 'pos.session', ​ ​​
​ ​'active_ids': [id_new_pos_session], ​
​}}
)

I hope someone can help me, thank you.

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
How do I get Product Prices with json API? Resuelto
api
Avatar
Avatar
1
nov 25
3266
Has anyone integrated Helpdesk with Zoom for meeting scheduling?
api
Avatar
Avatar
1
ago 25
1497
Using API check if Odoo is using Odoo sh or on-premises hosting. Resuelto
api
Avatar
Avatar
1
ago 25
1945
External API XMLRPC Authentication Keeps Replying with false
api
Avatar
Avatar
Avatar
2
jul 25
4933
API xmlrpc - upload pdf bills to account Resuelto
api
Avatar
Avatar
Avatar
3
jul 25
2047
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Sitio web hecho con

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now