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

Validate Delivery Order (stock.picking) fails due to confirmation popup in odoo.sh

Suscribirse

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

Se marcó esta pregunta
validatestock_pickingOdooSH
2 Respuestas
4758 Vistas
Avatar
Ken Hawley

Executing the follow RPC, results in a json object return instead of "true" as expected.

When I hit the button in the GUI, a popup comes up and forces me to confirm the validation.

The json return from the RPC, it is apparent, is the popup definition!

{   "jsonrpc": "2.0",     "method":"call",    "id":921359310,    

"params": {        "service":"object",        "method":"execute_kw",        

"args": [ "mydb", "77", "mypw", "stock.picking", "button_validate", [[27]]]  }}


Two questions:

1. Is it possible to execute the stock.picking "button_validate" and skip the popup?  (Is there another call that I am overlooking?)

2. If I want to do a stock_immediate_transfer  "process" instead, what are the id arguments?

I tried it with move ids, but that did not work.

0
Avatar
Descartar
Ken Hawley
Autor

OK, having tried the following:
{ "jsonrpc": "2.0",
"method":"call",
"id":921359310,
"params": {
"service":"object",
"method":"execute_kw",
"args": [ "mydb", "77", "mypw", "stock.picking", "button_validate", [[29]],
{ "context": {"skip_backorder":true} } ]
}
}
But, I still get back some popup json:
{
"jsonrpc": "2.0",
"id": 921359310,
"result": {
"name": "Immediate Transfer?",
"type": "ir.actions.act_window",
"view_mode": "form",
"res_model": "stock.immediate.transfer",
"views": [
[
1058,
"form"
]
],
"view_id": 1058,
"target": "new",
"context": {
"skip_backorder": true,
"button_validate_picking_ids": [
29
],
"default_show_transfers": false,
"default_pick_ids": [
[
4,
29
]
]
}
}
}
So, at this point I am feeling a little stupid, or at least that I didn't understand the "context" shorthand. This seems to indicate it wants to validate picking_id 29, but just won't do it. Is that correct?

Ken Hawley
Autor

We're running V15 in Odoo.sh, by the way.

Ken Hawley
Autor

The json I posted contains "name": "Immediate Transfer?", which looks like it's generated in code that is protected by 'skip_immediate' not 'skip_backorder'
We'll be trying that next.

Ken Hawley
Autor

When skip_immediate is also added to the context, the call returns:
{
"jsonrpc": "2.0",
"id": 921359310,
"result": true
}

But the stock.picking record does not move inventory or change state.

Avatar
Ken Hawley
Autor Mejor respuesta

What finally seems to work for me is to execute one call with:

       "args": [ "mydb", "77", "mypw", "stock.picking", "action_set_quantities_to_reservation", [[30]] ]

which is the equivalent of the "Set Quantities" button, followed by this:

        "args": [ "mydb", "77", "mypw", "stock.picking", "button_validate", [[30]], { "context": {"skip_backorder": true, "skip_immediate": true}} ]

which is the equivalent of the "Validate" button.   It's not clear if the context is still required in the second call, but it doesn't seem to hurt.

Thanks to Ray for his comments and especially the link to the code.  I would be especially interested to understand why the "button_validate" with context failed to do the job.

 

0
Avatar
Descartar
Avatar
Ray Carnes (ray)
Mejor respuesta

At v14 we added a context key called skip_backorder.

See it in the code at https://github.com/odoo/odoo/blob/14.0/addons/stock/models/stock_picking.py#L982

Send this key in context when you make your call.

0
Avatar
Descartar
Ken Hawley
Autor

Thanks. I'll be trying this on Monday. As a long-time developer, but newbie on Odoo, I am still wrestling with the oddness of the codebase. That stock_picking.py, for example, is nothing like the version in the community edition that I have downloaded and the GitHub code for our Odoo.sh instances are currently opaque to us. A very frustrating experience.

Ray Carnes (ray)

We have versions. I linked you to Odoo 14 which was released in 2020. You can post your version in future posts as answers can be version dependent.

¿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
TypeError: _action_done() got an unexpected keyword argument 'cancel_backorder' when validating a Delivery Order
error validate stock_picking v14
Avatar
Avatar
2
feb 23
3850
what is the use of stock.picking, stock.picking.out and stock.picking.in Resuelto
stock_picking
Avatar
Avatar
1
nov 24
20228
Odoo sh build time too high Resuelto
OdooSH
Avatar
Avatar
1
may 25
4271
Does Odoo Have Any Validation Documentation?
validate
Avatar
Avatar
1
sept 23
2829
OdooSH pricing and use cases Resuelto
OdooSH
Avatar
Avatar
Avatar
2
dic 22
4615
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.

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