Create a Simple ODOO REST API in 15 minutes for Odoo Mobile Application with HTTP Controller

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Create a simple Odoo REST API in only 15 minutes! Create an Odoo Application with HTTP Controller. Integrate Odoo with any system.
    ---------------------------------------------------------------------------------------------
    🌍 START YOUR OWN TURN-KEY BUSINESS WITH ODOO!
    📝 Complete Odoo Business Success Kit Included!
    📝 Includes One-on-One Odoo & Business Success Coaching
    👍 Visit SiteProposals.com to learn more!
    ---------------------------------------------------------------------------------------------
    See my new Odoo Mobile Toolkit!
    • Build Native Odoo Mobi...
    [ SUBSCRIBE & COMMENT ]🌍 / odooclassvideos
    🌍 Get the VERY BEST Odoo Developer Coaching & Training
    ✅ odooinnercircle.com
    👍 Learn to become an expert Odoo Developer in Record Time
    📝 DISCOUNT! Mastering Odoo Development ✅ tinyurl.com/57hu2wkj
    Odoo Development Videos
    👍 Custom Odoo Reports: ✅ • Custom Odoo Reports Tu...
    👍 Dynamic Web Controllers: ✅ • Dynamic Web Controller...
    👍 Basic Odoo Inheritance: ✅ • Basic Odoo Inheritance...
    👍 Using SQL Statements in Odoo: ✅ • Using SQL Statements i...
    👍 Create an Odoo Web Controller in 10 Minutes ✅ • Odoo Web Controller | ...
    👍 THE BEST Odoo 14 Installation Guide ✅ • Odoo 14 Installation G...
    👍 Build Custom Odoo Apps in Developer Mode ✅ • Create a Custom Odoo A...
    Learn about Odoo Developer Bootcamp ✅ tinyurl.com/57hu2wkj
    📝 Transform your business with best-in-class Odoo integration and Developer Workshops. Expert Odoo Consultation and access to the very best Odoo Developers in the business.
    To get the very best Odoo Developer Courses visit:
    www.OdooClass.com
    Often when creating mobile applications or systems that will interact with Odoo you will wish to use a REST API. This method gives you great flexibility. In this video we look at one of the most simple implementations, an HTTP GET request using an Odoo controller.
    In addition, we learn that Odoo will automatically make sure to protect our models from unauthorized access.
    As a bit of a bonus, we see how we can use a try/except block in Python to trap conditions in which we can't retrieve data through the API.
    This video has several important concepts that will help you in building Odoo applications.
    1. Using the scaffold command to create an Odoo application
    2. Modifying the built-in templates and testing your application
    3. Using simple HTML commands to format the output
    4. Accessing models and records within Odoo
    5. Basic FOR loop to go through the record collection
    6. Using Try/Except blocks to trap errors
    Creating a simple HTTP controller for Odoo isn't difficult. Note that this video demonstrates how to do an HTTP controller. There is a bit different syntax if you wish to use JSON or another method for passing & retrieving data from the controller.
  • НаукаНаука

Комментарии • 70

  • @therealtakenbyWine
    @therealtakenbyWine 11 месяцев назад

    thanks bro ur the only one that solved my problem i've been looking for this for a month now i seriously can't thank you enough !!

  • @OnesinusSPT
    @OnesinusSPT 11 месяцев назад +1

    Choosing database before accessing the endpoint doesnt make sense to me, say i created an endpoint (url for my another app getting data from my odoo 15), is it possible for them to get the data? Beside using xmlrpc approach.

  • @mohammedrai8197
    @mohammedrai8197 3 года назад

    Hello Greg Moss,
    I Have a problem when printing the PDF documents with an error "Error Failed to load PDF document", with a deployment stack using Nginx + uwsgi + Odoo, wkhtmltopdf don't works.
    But when I use the same configuration and starting the ERP by using Nginx + Odoo, wkhtmltopdf works perfectly.
    Do you have experienced this issue and have an idea how to solved it.
    And if you can, we want to see a tutoriaj about the deployment stack using Nginx + uwsgi + Odoo.
    Thank you for the video tutorial.

  • @brianlefler8787
    @brianlefler8787 2 года назад +1

    Greg,
    Do you have any examples of how you would make this controller externally accessible? We want our ADFS system to push data into our employee database. This would be an automated task.

  • @JS-el4eg
    @JS-el4eg 3 года назад

    Thank you for the video
    It is always nice to see another Odoo Tutorial Video
    Since there is a little tutorial about Odoo's Front End framework, can you make a video of that?
    Specially after the introduction of OWL.

    • @OdooclassVideos
      @OdooclassVideos  3 года назад +2

      Thank you for the comment. I'm a huge fan of the new Front end frameworks and hope to share more here. Unfortunately it is a rather advanced subject and I'm limited to covering it in my workshops and my full courses. Hopefully as this channel grows I'll have an opportunity to put more time into free content here. Please check back as I do hope to put my very best tips here on the channel.

  • @RFIDSecurityWarehouse
    @RFIDSecurityWarehouse 2 года назад

    Clear presentation for quick understanding on the topic. Thanks.

  • @mazenbayad9856
    @mazenbayad9856 5 месяцев назад

    Greg
    Is it possible to separate the API in a deferent application server?

  • @henrysaleman6534
    @henrysaleman6534 2 года назад +1

    Thank you for the video,
    When using the http.route url I am getting a 404 page error
    any thoughts?

  • @davidyon7912
    @davidyon7912 2 года назад

    Thank you so much !!!

  • @dalilahannouche288
    @dalilahannouche288 3 года назад +6

    Thank you for your work and explanations. I would like to read better because it's hard to see your screen. Please make a zoom when you are coding for the next video. Thank you again.

    • @OdooclassVideos
      @OdooclassVideos  3 года назад +2

      Yes, thank you for the comment. For my report video i did some zoom ins to make it easier to read. I also increased the font size as well.

    • @dalilahannouche288
      @dalilahannouche288 3 года назад

      @@OdooclassVideos Thank you, you're great

  • @MatijaGudlin
    @MatijaGudlin Год назад

    Great video, please create video on posting (creating) data

  • @fredyfred1950
    @fredyfred1950 6 месяцев назад +1

    I'd like to make a flutter app for my store, and I want the customer to be able to connect to it using credentials stored in Odoo CRM to view my products. Could this work too?

    • @AhmedMostafa-so2jp
      @AhmedMostafa-so2jp 3 месяца назад

      i have the same use case, could you find a solution?

  • @rembautimes8808
    @rembautimes8808 2 года назад

    Thanks Greg , I am from Singapore and am very interested in building custom API for Oddo

  • @milleniumenterprise3254
    @milleniumenterprise3254 3 года назад

    hi, thanks for the video, how do you get vscode to work properly with /opt directory, it seems no matter what I try I cant make any changes to the files in my odoo project in vscode due to permission error.

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      Greetings. You need to assign permissions or change ownership of the source directories you wish to work with in VS Code then make sure you also have a user created in postgres as well. This is specifically one of the aspects I cover in my Mastering Odoo Development on how to setup and configure a development environment in Odoo.

  • @rogercanvas-odoo5202
    @rogercanvas-odoo5202 3 года назад

    Thank you for the video. Useful concept. Although Jason or FLutter API example would be really appreciated.

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      You're welcome. I will be releasing a whole series of mobile videos in the weeks ahead.

  • @nooralhudam.k.
    @nooralhudam.k. Месяц назад

    Amazing Tutorial

  • @zaheerbeg4810
    @zaheerbeg4810 5 месяцев назад

    In next video can you please increase font size ? By the way nice and simple 👍

  • @mmmmmuuuu
    @mmmmmuuuu 2 года назад

    Good Explanation, thanks a lot.

  • @Roshdyz
    @Roshdyz 7 месяцев назад

    thanks for the content. I Believe you need to zoom while recording, because aside from the audio, I can't see anything 😅

  • @mahmoodfawzi4676
    @mahmoodfawzi4676 3 года назад

    Nice and simple video, i just request you, how can we build payment gateway API for odoo as 3rd Party App, just like any payment acquires for odoo e-commerce? if you can make short video with the steps and the way will be much benefit for me.
    Thanks in advance

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      Greetings! Please reach out to me at OdooInnerCircle.com. We can schedule a strategy session to discuss.

  • @plgmgua
    @plgmgua 5 месяцев назад

    Nice!

  • @hdsmsmart
    @hdsmsmart 2 года назад

    Thanks you

  • @WALIXGAMFOWX
    @WALIXGAMFOWX 2 года назад

    hi i have this error
    line 179, in __getitem__
    return self.models[model_name]
    KeyError: 'sale.order'
    Which is the cause?

    • @OdooclassVideos
      @OdooclassVideos  2 года назад +1

      My first suggestion would be to make sure you have the sale application installed and designated in the manifest. Of course I don't know for sure how you filled self.models.

    • @WALIXGAMFOWX
      @WALIXGAMFOWX 2 года назад

      @@OdooclassVideos thanks

  • @johntizzy7614
    @johntizzy7614 Год назад

    Sir please can you show any of your previous work where flutter app was connected with odoo backend

  • @RFIDSecurityWarehouse
    @RFIDSecurityWarehouse 2 года назад

    Are you using Odoo Community or Enterprise? Do you install everything on your local machine so Odoo start working on Studio?

    • @OdooclassVideos
      @OdooclassVideos  2 года назад

      I work extensively in both. For the most part I use Odoo Studio only for prototyping and don't recommend it for production implementations. I always work locally and use github for my primary repositories on larger projects. For my production installations I typically use Amazon AWS or Digital Oceans. I've also used Ramnode without any problems and they are very inexpensive. Odoo.sh is also an option for enterprise and it has improved greatly through the years.

  • @rikochairnugroho1326
    @rikochairnugroho1326 3 года назад

    Thanks for the video

  • @dbk9555
    @dbk9555 2 года назад

    Thank you 🙏

  • @ranamorjal
    @ranamorjal 10 месяцев назад

    Appriciate Bro

  • @joedeir6028
    @joedeir6028 Год назад

    I am interested in connecting a PHP program to the Odoo program.

  • @togarhutabarat6938
    @togarhutabarat6938 3 года назад

    Thank you for the video.. How can I have that fancy "restart odoo" button?

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      That is just using Visual Studio Code for my development environment.

  • @RoamingAdhocrat
    @RoamingAdhocrat 2 года назад

    Suppose you were a system administrator for a county school system. Would it be in the realms of possibility to use Odoo to make a robust school records system in-house, serving concurrent users in the low hundreds and maintaining highly personal and legally privileged info for tens of thousands of people?

    • @OdooclassVideos
      @OdooclassVideos  2 года назад

      That is very possible. In fact there are several very robust school platforms available that could be customized as you wish.

  • @ahmedswilam1120
    @ahmedswilam1120 3 года назад

    Thank you for this video, can you make a video to explain how to create a json api's for mobile development?

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      Im glad you liked the video. Yes, I can give an example on that in just a few days. I'm actively working to release a mobile toolkit that uses a json api. Did you have a particular mobile framework you wished to target?

    • @aonekris
      @aonekris 3 года назад

      @@OdooclassVideos Can you target Flutter

    • @OdooclassVideos
      @OdooclassVideos  3 года назад

      @@aonekris That is one I already have a working toolkit for. Right now I'm working on it with my Odoo Inner Circle. Hope to share soon here on RUclips.

  • @mosumamosuma9490
    @mosumamosuma9490 Год назад

    can we integrate ubereat to odoo

  • @salama8891
    @salama8891 3 года назад

    Your tutorial is good and very clear but your Tuto path or playlist is so messy, I don't know where to start and where to continue.

    • @OdooclassVideos
      @OdooclassVideos  3 года назад +1

      Greetings. My RUclips channel is mostly for sample video content and one off tips & tricks for learning Odoo. I do have full courses that I put out that provide a step-by-step path on becoming an expert Odoo integrator or developer. That said, I will look at what I can do to create better organization on my channel.

  • @zaynsheikh9907
    @zaynsheikh9907 2 месяца назад

    Guys anyone know ho to do json request? Need help

  • @krishnaniyer9793
    @krishnaniyer9793 2 года назад

    Would like to see how to expose Odoo APIs as secure REST APIs with JSON payloads

    • @OdooclassVideos
      @OdooclassVideos  2 года назад

      Thanks for the comment. I will put together a video on that. It is something that I cover extensively in my Odoo Developer Mastermind course. You can learn more about it at OdooInnerCircle.com

  • @nyanmyoaung9549
    @nyanmyoaung9549 2 года назад

    It is nice video. It will be more better if you a little zoom in.

    • @OdooclassVideos
      @OdooclassVideos  2 года назад

      Yes! Thank you! I'm trying to make sure and zoom in more.

  • @gunahawk6893
    @gunahawk6893 3 года назад

    Nice video

  • @WALIXGAMFOWX
    @WALIXGAMFOWX 2 года назад

    Could you explain how to create oauth2.0 server in odoo

    • @OdooclassVideos
      @OdooclassVideos  2 года назад

      That is something I cover in my Mastering Odoo Development series. You can learn more about it at OdooInnerCircle.com

  • @Weblearns
    @Weblearns 3 года назад

    1+

  • @LenzHirsch
    @LenzHirsch 2 года назад +1

    This is no REST API

  • @Mfbzai
    @Mfbzai Год назад

    Your resolution monitor is too high for a tutorial, it looks smaller and not so comfortable to watch.

    • @OdooclassVideos
      @OdooclassVideos  Год назад

      Thank you for the feedback. I will quality check my future videos more closely.