Skip to Content
Menu
This question has been flagged
1 Reply
2185 Views

  https://www.odoo.com/forum/help-1/why-do-i-have-valueerror-opcode-s-on-automated-action-150558 

In this link they say I can only access certain variables in one of the answers. Is there a way to expand this? I need to make HTML GET request to pull JSON data from another server and having an scheduled action with python code seemed like the best way until I found that I am limited in what I can do.

Does anyone have examples or a link to documents on how I can achieve this? I have been googling for little bit now and I am at a loss.

Odoo 14

Avatar
Discard
Best Answer

You would need to build a module with Python based methods that pull the data.

You have full access to anything that Python or standard Python libraries support when you customize Odoo through modules.

See Building a Module at https://www.odoo.com/documentation/14.0/howtos/backend.html

You can still leverage Scheduled Actions if it makes sense, but you would now be calling a model method (optionally with arguments) in that action, like we do in some of the core actions:



https://github.com/odoo/odoo/blob/14.0/addons/stock/models/stock_rule.py#L522

For a specific example leveraging data from another server you can perhaps look at how this Community built Currency Rate Update module works:

https://apps.odoo.com/apps/modules/13.0/currency_rate_update/

Avatar
Discard
Related Posts Replies Views Activity
4
Apr 24
170719
0
Dec 23
602
5
Nov 24
217110
1
Dec 22
1692
2
Nov 22
1678