This is the problem I've encountered. In Odoo Online when you define a requests.post() in a server action it works just fine. But when you have Odoo On-Premise it does not work and gives requests is not defined. And this problems show in Odoo17 as well as Odoo18.
I am trying to send a request but it does not let me to.