Skip to Content
Menu
This question has been flagged
2 Replies
2036 Views

Hi,


I'm pretty new to Odoo Studio


I want to set an automation with Odoo Studio when one of my articles is selled (when the purchase order is created and stock is changing).


I tried to create an automation based on "Articles" model, when updating the "qty_available" field. But no related logs show in Technical > Data structure > Logging when I change the stock of a product OR when I creates a purchase order with a product (I tried to put record.message_post(body="HELLO WORLD") and

log('response', level='info') in the Python code of the automation, showing that it doesn't fire.


What am I doing wrong ?


Thanks !

Avatar
Discard
Best Answer

Hi,

You can define the action in the following manner


The automated action will get triggered when the purchase order is confirmed.


Feel free to ask questions, if any.

Thanks and Regards,

Divyansh

Avatar
Discard
Author Best Answer

Hi Divya, and thanks for your time.

My goal is to create an automation that will change stock quantity on wizaplace to actual stock in Odoo. So I need to be able to access to the stock of the product that is sold, programmaticaly (with python automation).


How could I achieve this please ?


Thanks and Regards :)

Avatar
Discard

hey Pierre, not sure what you mean by wizaplace

Author

Hi Divyansh,

Thanks for your answer.

Wizaplace is a marketplace solution. I need to make http requests to wizaplace's API from Odoo according to stock datas in Odoo. Is this possible please ?

Is it possible to make HTTP requests from python executed code of an automated actions please ?

Sorry to ask such different things on the same topic but I can't fins any technical or programming information in Odoo and I just need to know how to trigger Python Code that makes HTTP request when a stock of a product is diminished. You would ensure me to pass my new work probation :D

Thanks for your time !

Hey Pierre,

Help me understand one thing why is a purchase order getting created when a product is sold, usuallya sales order gets created when a product is sold, if the product being sold has a route set to purchase then corresponding to that sales order a purchase order is generated.

So why are u tracking purchase order, what's the flow?

Related Posts Replies Views Activity
0
Apr 21
2723
2
Nov 24
262
1
Oct 24
176
1
Oct 24
328
4
Oct 24
323