Hi ,
I want to do some backend process after return function in my controller ,
@http.route('/web/logintest/', type='json', auth='public', method=['POST'],
csrf=False)
def my_function(self, *args, **kwargs):
return {
"message": "Success",
}
#backend process nothing working after return function
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
1
Antworten
2830
Ansichten
Hi,
Nothing will work after return function in this way .Try like below
@http.route('/web/logintest/', type='json', auth='public', method=['POST'],
csrf=False)
def my_fuction(self, *args, **kwargs):
try:
return {
"message": "Success",
}
finally:
# backend process
Hope it'll help
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren