Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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
1588 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.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
How do I get Product Prices with json API? Resuelto
api
Avatar
Avatar
1
nov 25
3262
Has anyone integrated Helpdesk with Zoom for meeting scheduling?
api
Avatar
Avatar
1
ago 25
1496
Using API check if Odoo is using Odoo sh or on-premises hosting. Resuelto
api
Avatar
Avatar
1
ago 25
1937
External API XMLRPC Authentication Keeps Replying with false
api
Avatar
Avatar
Avatar
2
jul 25
4927
API xmlrpc - upload pdf bills to account Resuelto
api
Avatar
Avatar
Avatar
3
jul 25
2040
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 totalmente integrado.

Website made with

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