Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
validatestock_pickingOdooSH
2 Respostes
4714 Vistes
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 Best Answer

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)
Best Answer

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.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
TypeError: _action_done() got an unexpected keyword argument 'cancel_backorder' when validating a Delivery Order
error validate stock_picking v14
Avatar
Avatar
2
de febr. 23
3839
what is the use of stock.picking, stock.picking.out and stock.picking.in Solved
stock_picking
Avatar
Avatar
1
de nov. 24
20167
Odoo sh build time too high Solved
OdooSH
Avatar
Avatar
1
de maig 25
4226
Does Odoo Have Any Validation Documentation?
validate
Avatar
Avatar
1
de set. 23
2812
OdooSH pricing and use cases Solved
OdooSH
Avatar
Avatar
Avatar
2
de des. 22
4563
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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