I'm trying to integrate reactjs with Odoo, and successfully created components. Now my problem is that I cant get the JSON via odoo. The odoo programmer has to write special api request to make this happen. This is taking more time and code repetitions are plenty.
I tried may suggestions and none worked.
Is there a better way to convert the browse objects, that odoo generate, to JSON ?
Note: Entirely new to python and odoo, please forgive my mistakes, if any mentioned above.
maybe this will help you:
Step 1: Create js that runs reqiest to /example_link
Step 2: Create controller who listens that link @http.route('/example_link', type="json")
Step 3: return from that function json return json.dumps(res) where res is python dictionary and also dont forget to import json.
Thats all, it's not very hard, hope I helped you, good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With