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
    • eLearning
    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
    • Información
    • 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 taberna
    • 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
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • 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
    Browse all Industries
  • 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
    • Services for 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

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
4725 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.

Inscribirse
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
3839
what is the use of stock.picking, stock.picking.out and stock.picking.in Resuelto
stock_picking
Avatar
Avatar
1
nov 24
20181
Odoo sh build time too high Resuelto
OdooSH
Avatar
Avatar
1
may 25
4231
Does Odoo Have Any Validation Documentation?
validate
Avatar
Avatar
1
sept 23
2814
OdooSH pricing and use cases Resuelto
OdooSH
Avatar
Avatar
Avatar
2
dic 22
4571
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