Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

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

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
validatestock_pickingOdooSH
2 Răspunsuri
4690 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
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.

Imagine profil
Ken Hawley
Autor Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Ray Carnes (ray)
Cel mai bun răspuns

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
Imagine profil
Abandonează
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!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
TypeError: _action_done() got an unexpected keyword argument 'cancel_backorder' when validating a Delivery Order
error validate stock_picking v14
Imagine profil
Imagine profil
2
feb. 23
3825
what is the use of stock.picking, stock.picking.out and stock.picking.in Rezolvat
stock_picking
Imagine profil
Imagine profil
1
nov. 24
20111
Odoo sh build time too high Rezolvat
OdooSH
Imagine profil
Imagine profil
1
mai 25
4188
Does Odoo Have Any Validation Documentation?
validate
Imagine profil
Imagine profil
1
sept. 23
2776
OdooSH pricing and use cases Rezolvat
OdooSH
Imagine profil
Imagine profil
Imagine profil
2
dec. 22
4533
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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