Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

290
Views
Actualizar cantidad disponible a través de XMLRPC y PHP odoo V14

Quiero cambiar un campo de "Cantidad disponible", así que pruebo este código:

 $change_id = $models->execute_kw($db, $uid, $password, 'stock.change.product.qty', 'create', array(array( 'product_id'=>11745, 'location_id'=>15, 'new_quantity'=>26, ) )); $models->execute_kw($db, $uid, $password, 'stock.change.product.qty', 'change_product_qty', [$change_id]);

Pero no funciona. ¿Cómo puedo arreglarlo?

ingrese la descripción de la imagen aquí

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Para cambiar la cantidad de stock de los productos, debe crear un registro stock.quant .

 $models->execute_kw($db, $uid, $password, 'stock.quant', 'create', array(array( 'product_id'=>11745, 'location_id'=>15, 'inventory_quantity'=>26, ) ));

También tenga en cuenta que no se recomienda cambiar directamente la cantidad de existencias, debe cambiarse desde una orden de compra o una orden de venta o desde ajustes de producción o inventario según la situación.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!