Odoo Mobile App Development - Authentication, Fetching Data & Creating Records Using Controller

  Рет қаралды 78,307

Odoo Mates

Odoo Mates

Күн бұрын

Odoo mobile app development. How to do authentication form mobile app to access Odoo. How to fetch data to mobile app from odoo database using controllers. Create record in Odoo from mobile app. Mobile App development in Odoo.
Get Free 100 USD Credit in Digital Ocean Sign UP: m.do.co/c/9fce...
Full Digital Ocean Videos: • 200$ Free Credits | Di...
Local Host On Internat ? See: • Ngrok: Make Localhost ...
Part2: • Odoo Mobile App Develo...
For Odoo 13 and Above, see this Update: • How To Get Session ID ...
Email: odoomates@gmail.com

Пікірлер: 161
@legend-facts
@legend-facts 2 жыл бұрын
Omg Life saver Proud of you Odoo mates Always be happy life
@OdooMates
@OdooMates 2 жыл бұрын
Glad to hear that
@agent_mo1922
@agent_mo1922 3 жыл бұрын
best Video for Odoo API tutorial, man you need 1 Mill Views
@OdooMates
@OdooMates 3 жыл бұрын
Thanks brother :)
@metalmlover
@metalmlover 2 жыл бұрын
great work Odoo Mates. way to go. ❤❤
@OdooMates
@OdooMates 2 жыл бұрын
thanks bro
@tahamasadullah3490
@tahamasadullah3490 3 жыл бұрын
This is so much helpful. Quick question, suppose if we provide non admin credentials and get session key, does it take care of permissions etc?
@OdooMates
@OdooMates 3 жыл бұрын
yes it will be based on the access rights set to the given user login
@marconeumann1085
@marconeumann1085 4 жыл бұрын
Thanks for the video, Question. Can i reduce response fields in session info?
@OdooMates
@OdooMates 4 жыл бұрын
yes its possible
@joeldiaz9133
@joeldiaz9133 3 жыл бұрын
cansado
@MukeshG-or3ku
@MukeshG-or3ku 2 ай бұрын
if we use jsonrpc protocol for api then its necessary to pass session once after authenticating?
@josearmando1736
@josearmando1736 3 жыл бұрын
Hi. This video was a great help for me. Now I have a big problem..How can I create new users from external apps without use admin password. Just a form,.send new user data, and create user in odoo. I have tryed no positive results. Because i can not write those records.
@OdooMates
@OdooMates 3 жыл бұрын
You can try to use the concept of how the default sign up works in odoo. Can you have a look at this controller and see, whether it helps: @http.route('/web/signup', type='http', auth='public', website=True, sitemap=False)
@harshalbhoir3124
@harshalbhoir3124 3 жыл бұрын
Great Tutorial buddy ... Thank you for your wonderful contribution.. Keep it up
@OdooMates
@OdooMates 3 жыл бұрын
Glad it helped
@SajidHussain-j9v
@SajidHussain-j9v 3 күн бұрын
Great tutorial, you are amazing!
@elinamalthea3289
@elinamalthea3289 7 ай бұрын
Can I ask what language are you using for Odoo? Thank you
@OdooMates
@OdooMates 7 ай бұрын
python, xml and js
@AmartuvshinAmaraa-eb9ox
@AmartuvshinAmaraa-eb9ox Жыл бұрын
Hi bro i have one question. If user enable mfa. How to get session_id
@abdullahrehman7321
@abdullahrehman7321 3 жыл бұрын
Hey odoo mates,can you guide us about how to get one2many field from an API call? field like order_line in sale. Thanks
@OdooMates
@OdooMates 3 жыл бұрын
you can prepare a dictionary from the one2many lines and pass it from the API
@theRajkotian
@theRajkotian 4 жыл бұрын
Hey, Very Nice Video! I wanted to what are the options for Odoo Online Instances? Where we don't have access to the code?
@OdooMates
@OdooMates 4 жыл бұрын
We recently started a series showing how to customize Odoo without code, I think it will be useful for the Odoo online users . If this is not the question, let us know
@theRajkotian
@theRajkotian 4 жыл бұрын
@@OdooMates Yes, I loved those videos too :-) But here, I am talking about creating the controller for REST APIs which you created. Is it possible to achieve the same from Online Instance?
@OdooMates
@OdooMates 4 жыл бұрын
What is the purpose of looking for creating rest APIs for Odoo online instance ?
@theRajkotian
@theRajkotian 4 жыл бұрын
@@OdooMates Same purpose as this video sir, creating custom android/iOS applications or extend via third party application. :-) I am not aware if is there any other way to do so for the online instances.
@ahmedharoon2740
@ahmedharoon2740 3 жыл бұрын
amazing!! huge thanks, this will definitely help us creating real Mobile Apps for Odoo. just wants to ask as I am using odoo 14, will all steps works as it is now or something deprecated and there is any upgraded / updated things to achieve the same? be blessed :)
@OdooMates
@OdooMates 3 жыл бұрын
There is a slight change in getting session id, it will be inside the cookies, rest of them will remain same
@ahmedharoon2740
@ahmedharoon2740 3 жыл бұрын
@@OdooMates thanks, yes you were right, i can connect but Postman not showing "session id" as in your video, how i can have it to go further? i am stuck, how i can follow this video to achieve POST method? please help. be blessed :)
@OdooMates
@OdooMates 3 жыл бұрын
@@ahmedharoon2740 See this video especially for odoo13 and higher: kzbin.info/www/bejne/gqfUaGagl96afKc
@ahmedharoon2740
@ahmedharoon2740 3 жыл бұрын
@@OdooMates thanks a bunch for your help... will check the video and comment there. be blessed :)
@OdooMates
@OdooMates 3 жыл бұрын
@@ahmedharoon2740 happy to help :)
@ehabmosilhy
@ehabmosilhy 4 жыл бұрын
Thank you for the video. I have a problem here, when you use the session ID the you got after authentication in order to get information from Odoo, it succeeds. But I don't think it succeeds because you used the session ID but because Postman created a cookie and used it for authentication. To check this point, You may provide a false Session ID or delete it and the request will work - or you may use the session ID as usual but before that try to delete the cookie from Postman because that's what happens with me every time.
@OdooMates
@OdooMates 4 жыл бұрын
This method will work while creating the mobile application :) Regarding the cookie in postman you can remove the cookies and try with the authenticated session_id , if there is only valid session_id it will work
@ehabmosilhy
@ehabmosilhy 4 жыл бұрын
@@OdooMates But in Odoo 13, there's no session_id in the response.
@OdooMates
@OdooMates 4 жыл бұрын
@@ehabmosilhy It has been moved to cookies
@OdooMates
@OdooMates 4 жыл бұрын
@@ehabmosilhy kzbin.info/www/bejne/gqfUaGagl96afKc
@ehabmosilhy
@ehabmosilhy 4 жыл бұрын
@@OdooMates Thanks for this info. But how can I send it in a response?
@omkardeekonda2687
@omkardeekonda2687 2 жыл бұрын
This is very helpful. The authentication API used in the video accepts username and password. If we want to achieve the similar behaviour with oAuth login what will be the authentication API in Odoo 13?
@OdooMates
@OdooMates 2 жыл бұрын
you can use the same api itself, just enable auth login in the database, this will work for it too
@omkardeekonda2687
@omkardeekonda2687 2 жыл бұрын
@@OdooMates Thanks for the response. 🙏
@OdooMates
@OdooMates 2 жыл бұрын
Glad to help
@omkardeekonda2687
@omkardeekonda2687 2 жыл бұрын
@@OdooMates Can you please throw some insight on how to update the "Access-Control-Allow-Headers" header to manage the CORS issue when the origin is different for Odoo server and web application. Thank you :)
@OdooMates
@OdooMates 2 жыл бұрын
Did you set the session id in the cookie
@rabithbo7089
@rabithbo7089 3 жыл бұрын
Even I didn't put X-Openerp, and it still can get data! I think it is secure! Is there any way besides this?
@OdooMates
@OdooMates 3 жыл бұрын
What you get in response
@josearmando1736
@josearmando1736 4 жыл бұрын
Hi, I have a problem. I did all such as you mentioned and it works in Postman, but from an Android App my custom services return a 404 Not found, in postman they return the data OK, But from my Android App I can use the authenticate because it is from factory in Odoo but my customs services not.
@OdooMates
@OdooMates 4 жыл бұрын
did you call rest of the api with session_id ?
@aurlicforever
@aurlicforever 3 жыл бұрын
I also had this problem. I use Volley. I was able to recover the data by putting session_id in the cookies headers.put("Cookie", "session_id="+session_id);
@samirpaudyal5908
@samirpaudyal5908 3 жыл бұрын
Here session id is coming with expiry date, will it expires on respective date and we have generate new session id again ?
@OdooMates
@OdooMates 3 жыл бұрын
Of now yes
@swastikgurung
@swastikgurung 4 жыл бұрын
Thank You! It helped a lot.
@OdooMates
@OdooMates 4 жыл бұрын
Happy to hear it :)
@savvvvvvvvvvvyuuu
@savvvvvvvvvvvyuuu Жыл бұрын
After getting session id how to redirect to odoo without login from external application?
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
There is no session_id in Odoo 14
@gitagitagitaable
@gitagitagitaable 3 жыл бұрын
It doesnt work, if u using postman the cookie save the session id. But in android apps its not working at all .
@OdooMates
@OdooMates 2 жыл бұрын
in android the session has to be store and passed in the request header
@jjackofall
@jjackofall 3 жыл бұрын
It's working but as I checked, the session_id will expire after certain period of time. Then the API will not work. What should I do in that case. And second thing, in case of GET requests, we have to pass something in body. And is there any way to change the structure of response ?
@OdooMates
@OdooMates 3 жыл бұрын
session_id will be expiring only after one or two week of inactivity from this session. If he is logging into the app daily or weekly it wont get expired
@OdooMates
@OdooMates 3 жыл бұрын
the second part of the questions, you are asking about how to update the response of the authentication ?
@jjackofall
@jjackofall 3 жыл бұрын
@@OdooMates in android app, no one logins every day or weekly... Means if a user logged in then it shouldn't be automatically logged out... But in case of session id it'll log out automatically after some weeks...
@jjackofall
@jjackofall 3 жыл бұрын
Because there's an expiration date of the session id in cookies
@jjackofall
@jjackofall 3 жыл бұрын
@@OdooMates the second part... I want to update/change the response structure of all APIs as in case of get API, it asks for something in body...
@hackerpercy
@hackerpercy 3 жыл бұрын
Thank You! Is an excellent Video Muchas Gracias me ayudo mucho, muy bien explicado
@OdooMates
@OdooMates 3 жыл бұрын
Thanks for the support :)
@zahidjalal855
@zahidjalal855 4 жыл бұрын
Hello nice tutorial. Is there any repo where we can get source code sample please ?
@OdooMates
@OdooMates 4 жыл бұрын
You can search Odoo development tutorial in Odoo apps or search odoo mages github
@jatinkant1711
@jatinkant1711 Жыл бұрын
can i use in default crm module as i am not working on custom module?
@OdooMates
@OdooMates Жыл бұрын
You can use default crm module, if you need to create record in odoo from third party apps, see this: kzbin.info/www/bejne/eZzUamirfdqii7M
@abdullahrehman7321
@abdullahrehman7321 3 жыл бұрын
Hey what to do to get image of employee? its returning a very long string in json
@OdooMates
@OdooMates 3 жыл бұрын
save it as an attachment and return the url of the attachment to mobile app
@misterg38
@misterg38 3 жыл бұрын
@@OdooMates How?
@abdullahrehman7321
@abdullahrehman7321 3 жыл бұрын
@@misterg38 I did it like image_url_1920 = 'your_url' + '/web/image?' + 'model=hr.employee&id=' + str( rec.id) + '&field=image_128' Where i write your_url you can use web.base.url but it wasn't helpful in my case.
@mosabawad1634
@mosabawad1634 3 жыл бұрын
This is so helpful
@OdooMates
@OdooMates 3 жыл бұрын
Thanks brother :)
@abdulrafeeque182
@abdulrafeeque182 4 жыл бұрын
Nice. can you please tell me how to signup a user(portal) . so he can make new orders (eCommerce) and do other stuffs? i created a user by signing with an admin account first(to res.users) and right after the creation authenticated the new user by calling /web/session/authenticate but this user(portal) doesn't have access to make a new order(sale.order). can you please tell me how can i achieve this. please reply. thank you
@OdooMates
@OdooMates 4 жыл бұрын
is the question related to mobile app development or normal odoo, like how to do sign up in odoo ?
@abdulrafeeque182
@abdulrafeeque182 4 жыл бұрын
@@OdooMates mobile app development
@abdulrafeeque182
@abdulrafeeque182 4 жыл бұрын
@@OdooMatesi'm developing a flutter app using this library pub.dev/documentation/odoo_api/latest/
@rizkiananda5724
@rizkiananda5724 3 жыл бұрын
thank you sir ... can u tell us how to use api key on odoo 14?
@OdooMates
@OdooMates 3 жыл бұрын
For odoo13 and above: kzbin.info/www/bejne/gqfUaGagl96afKc
@rizkiananda5724
@rizkiananda5724 3 жыл бұрын
@@OdooMates sir not Session ID but API key
@OdooMates
@OdooMates 3 жыл бұрын
May I know API key of which process ?
@felax95
@felax95 2 жыл бұрын
Go to user settings in odoo, generate API key on the user. Use this key as password in your python files
@smartcoding-ma
@smartcoding-ma Жыл бұрын
Response body is not available to scripts (Reason: CORS No Allow Credentials) how to solve this problem in browser , i can not send request using axios with withCredentials: true to set the cookie automaticly in browser
@aditechsoftwaresolutionpvt857
@aditechsoftwaresolutionpvt857 11 ай бұрын
where is Mobile Application
@OdooMates
@OdooMates 3 ай бұрын
that has to be designed separately, using this api end points
@sergiobustamante381
@sergiobustamante381 4 жыл бұрын
What I have to add in get_patients controller, in order to get just one patient by its ID? Thank you.
@OdooMates
@OdooMates 4 жыл бұрын
add a argument in function to receive the id of patient, then based on it, you can search and return
@ArockiaInfantJesus
@ArockiaInfantJesus Жыл бұрын
How to attache the file in Json format brother
@rajeshkumarcbm
@rajeshkumarcbm 4 жыл бұрын
Thanks for this video, very useful.
@OdooMates
@OdooMates 4 жыл бұрын
Glad to hear that!
@effessservices3859
@effessservices3859 2 жыл бұрын
Thanks for time giving to this world...! Nice video. I have also create module and controller like your video and jd_id = request.env['mymdule'].sudo().create(jddict).. throw the error on here TypeError: 'mymodule' object is not callable. Why this error coming. Exact done like your video.
@OdooMates
@OdooMates 2 жыл бұрын
What is your model name
@effessservices3859
@effessservices3859 2 жыл бұрын
_name = 'mymodule'
@effessservices3859
@effessservices3859 2 жыл бұрын
Hi, Odoo Mates, Woudl like to get paid service from your side. Kindly tell me how I contact you.
@PerfectHusbu
@PerfectHusbu 7 ай бұрын
i dont see session_id in my response, im using odoo 16
@OdooMates
@OdooMates 7 ай бұрын
kzbin.info/www/bejne/gqfUaGagl96afKc
@salaizy
@salaizy 3 жыл бұрын
Hello, where is your tutorial on the controller?
@OdooMates
@OdooMates 3 жыл бұрын
kzbin.info/www/bejne/q5XUlZ2jirOSaMU
@salaizy
@salaizy 3 жыл бұрын
@@OdooMates Thk u for ur fast feedback
@OdooMates
@OdooMates 3 жыл бұрын
@@salaizy welcome brother
@TrangTran-vk3pr
@TrangTran-vk3pr 3 жыл бұрын
thank you
@OdooMates
@OdooMates 3 жыл бұрын
welcome :)
@kenzasouabni
@kenzasouabni 2 жыл бұрын
Function declared as capable of handling request of type 'json' but called with a request of type 'http'
@OdooMates
@OdooMates 2 жыл бұрын
change the controller type to http or initiate json request
@kenzasouabni
@kenzasouabni 2 жыл бұрын
@@OdooMates it run in Postman with Json but in URL same ERROR
@OdooMates
@OdooMates 2 жыл бұрын
@@kenzasouabni if you are running in browser it will be http request
@zawnaing5838
@zawnaing5838 4 жыл бұрын
Hello Sir desktop-42vq205:8069/web/session/authenticate If I call thest localhost I get an error of [ Bad Request Session expired (invalid CSRF token) ] why? please tell me
@OdooMates
@OdooMates 4 жыл бұрын
did you solved this ?
@niralidarji3378
@niralidarji3378 3 жыл бұрын
i want to learn how to odoo login page in android ??
@OdooMates
@OdooMates 3 жыл бұрын
for designing the login page you need to know android development or support from an android developer, regarding the authentication functionality is explained in this video
@niralidarji3378
@niralidarji3378 3 жыл бұрын
okk
@OdooMates
@OdooMates 3 жыл бұрын
@@niralidarji3378 :)
@bisyrim1030
@bisyrim1030 Ай бұрын
thanks
@OdooMates
@OdooMates 28 күн бұрын
You're welcome!
@legend-facts
@legend-facts Жыл бұрын
Have a biz request plz brother create mobile app development for odoo16
@OdooMates
@OdooMates Жыл бұрын
you can follow same steps in odoo 16 also
@legend-facts
@legend-facts Жыл бұрын
@@OdooMates but odoo 16 have not session authentication
@23140402
@23140402 Жыл бұрын
en odoo 15 no existe la propiedada session_id
@OdooMates
@OdooMates Жыл бұрын
kzbin.info/www/bejne/gqfUaGagl96afKc
@23140402
@23140402 Жыл бұрын
@@OdooMates gracias lo probaré mañana
@TakaKun944
@TakaKun944 7 ай бұрын
how to get user profile picture?
@mohamedelmalawany6600
@mohamedelmalawany6600 3 жыл бұрын
hi how to pass login information on url to auto login http for example I want open odoosite.com/web?login=login&password=password and return logged in user site on odoo 14 ver
@nirmalasudhir1457
@nirmalasudhir1457 4 жыл бұрын
@OdooMates: Can I get the source code Please?
@OdooMates
@OdooMates 4 жыл бұрын
You can get it from Odoo app store or from our github repository
@nirmalasudhir1457
@nirmalasudhir1457 4 жыл бұрын
@@OdooMates what's the app name? Or could you please share me the github repo?
@OdooMates
@OdooMates 4 жыл бұрын
You can make a search of Odoo mates github
@iGuntaram
@iGuntaram 3 жыл бұрын
how to return o2m field sir?
@OdooMates
@OdooMates 3 жыл бұрын
send it as a list of dictionary
@iGuntaram
@iGuntaram 3 жыл бұрын
@@OdooMatesthank you sir, i get it!
@OdooMates
@OdooMates 3 жыл бұрын
@@iGuntaram it is basic python, you can iterate the one2many field over a for loop and create a dict and append it to a list.
@OdooMates
@OdooMates 3 жыл бұрын
@@iGuntaram Sample: list_val = [] for line in self.order_line: vals = { 'id': line.id } list_val.append(vals)
@farhanreninda684
@farhanreninda684 2 жыл бұрын
is there a kotlin version?
@OdooMates
@OdooMates 2 жыл бұрын
not yet into this language, but you can check this, communicating with odoo using java: kzbin.info/www/bejne/n6TNmaqBdrFpaa8
@vipinkumarv1912
@vipinkumarv1912 4 жыл бұрын
If the controller works. If we have multiple databases .
@OdooMates
@OdooMates 4 жыл бұрын
You have to use db_filter then
@legend-facts
@legend-facts Жыл бұрын
Brother please create APi for odoo16
@OdooMates
@OdooMates Жыл бұрын
sure, will do in upcoming days
@legend-facts
@legend-facts Жыл бұрын
@@OdooMates ok bro i am wait
@legend-facts
@legend-facts Жыл бұрын
have big request
@tungphamkim7447
@tungphamkim7447 7 ай бұрын
cc
@communehassibahbah5984
@communehassibahbah5984 3 жыл бұрын
You can offer me this service for a fee
@OdooMates
@OdooMates 3 жыл бұрын
building api's for mobile app development ?
@communehassibahbah5984
@communehassibahbah5984 3 жыл бұрын
@@OdooMates no
@OdooMates
@OdooMates 3 жыл бұрын
@@communehassibahbah5984 then ?
@communehassibahbah5984
@communehassibahbah5984 3 жыл бұрын
@@OdooMates I want to customize the Odoo app or rather simplify it Modification of the application does not include its algorithms, but I will give you an example Hide some buttons that the user does not need Like the tax button Payment terms and conditions Electronic signature and online payment And some tabs that the user does not need Change the color of the program, buttons and logo This is about the shape As for the content area? Export the list of products, customers and suppliers from the datagridview to the application database Adjust product prices through the desktop program Import sales from the app to the desktop app and mark them as imported Import Payments Per Customer
@imrankhan-hj2dx
@imrankhan-hj2dx 2 жыл бұрын
give me a om hospital code
@OdooMates
@OdooMates 2 жыл бұрын
apps.odoo.com/apps/modules/15.0/om_hospital/
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 27 МЛН
Epic Reflex Game vs MrBeast Crew 🙈😱
00:32
Celine Dept
Рет қаралды 35 МЛН
这到底是怎么做到的 #路飞#海贼王
00:10
路飞与唐舞桐
Рет қаралды 3,5 МЛН
I Used AI To Build This $900K/mo App In A Day
21:48
Astro K Joseph
Рет қаралды 298 М.
Mastering Odoo 17: Advanced Mobile App Development for Extended Functionality
4:26
Odoo ERP by O2B Technologies Experts
Рет қаралды 2,7 М.
What Authentication System Should I Use For My App?
20:41
IAmTimCorey
Рет қаралды 69 М.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,5 МЛН
The EASIEST Way To Build Your Mobile App In 30 Minutes (No Code)
9:56
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 818 М.
Установка ODOO на Windows, Ubuntu,Debian.
11:11
eurodoo
Рет қаралды 1,6 М.
Ozoda - Lada ( Official Music Video 2024 )
06:07
Ozoda
Рет қаралды 27 МЛН